Updating Folder Path - AutoHotKey - scripting

I am trying to figure out how to update a path and I am unsure how to do it and I keep getting some errors.
I need to update the Sample Output that is Displayed on the EV Output. Any help would be great.
As you can see in the image Output sample is updating the selected Input folder. I need it to be the Info that is in EV Output.
Here is my Menu Code
;; MENU
; Left Side Menu
Gui, Add, Button, x7 y7 w110 h30 gInput, Select Input Folder
Gui, Add, Checkbox, x7 y47 w730 h20 checked vCheck1,Include the last folder of the input folder in the output?
Gui, Add, Text, x22 y82 w600 h20 , Output Sample:
Gui, Add, Text, x132 y82 w610 h20 vDisplayPath, %DisplayPath% ;--Line needs to match EV Output
Gui, Add, Button, x12 y122 w110 h30 gOutputEV, Select EV Output
Gui, Add, Button, x12 y162 w110 h30 gOutputWC, Select WC Output
Gui, Add, Text, x127 y17 w275 h20 vDisplayInput, ;display selected folder - input
Gui, Add, Text, x132 y132 w250 h20 vDisplayEV, ;display selected folder -ev <--- Selected to update Display Path
Gui, Add, Text, x132 y172 w250 h20 vDisplayWC, ;display selected folder - wc
Gui, Add, Text, x12 y215 w190 h20 , Last Name, First Name: ; Name Field
Gui, Add, Edit, x171 y215 w170 h30 vName, DoeJohn ; Editable Name Type
Gui, Add, Text, x12 y250 w190 h30 , Collection Date (YYYYMMDD):
Gui, Add, Edit, x171 y250 w100 h30 r1 vtime,%TimeString%
Gui, Add, Button, x12 y280 w110 h30 gSubmit, Submit
; Right Side Menu
Gui, Add, Text, x757 y7 w130 h20 , Helpful Buttons:
Gui, Add, Button, x757 y77 w160 h30 gOpenTC, List Mounted TrueCrypt Devices
Gui, Add, Button, x757 y37 w160 h30 gMountTC, Auto-Mount TC Devices
Gui, Add, Button, x757 y217 w160 h30 gDismountTC, Dismount ALL TC Devices
; Version Info
Gui, Show, w936 h350, Mobile Robocopy Script v2.5,NoHide
GUI, Add, Picture, x550 y270 w350 h60, %MyPic%
Return
Here is my EV Code
OutputEV:
FileSelectFolder,OutputEV,, 3, Select EV Output Directory For Logs
if OutputEV =
{
MsgBox, You didn't select a log folder. Try again!
return
}
else
Guicontrol,1:,DisplayEV,%OutputEV%
return
I have tried adding like Guicontrol,1:,DisplayOutPutEV,%DisplayOutPutEV% but I get errors. I just need Sample Output to match EV Output and I cant figure that out.
Any help would be great.

At first glance, it seems your issue is with this line
Guicontrol,1:,DisplayEV,%OutputEV%
You've built up your GUI with no identifier, buy you're trying to talk to a control on GUI 1 which doesn't exist. Remove the GUI identifier.
GuiControl,, DisplayEV, %OutputEV%
In your GUI, give your controls DIFFERENT variables
Gui, Add, Text, x22 y82 w600 h20 vlblOutputSample, Output Sample:
Gui, Add, Text, x132 y82 w610 h20 vDisplayPath, %DisplayPath%
Then, in your subroutine, just set both controls' text to the OutputEV variable.
GuiControl,, DisplayEV, %OutputEV%
GuiControl,, lblOutputSample, %OutputEV%

Related

Display Gibberish in VBA ListView (instead of Hebrew, Cyrillic, Arabic, Chinese, Japanese, Greek)

I've created a listview in VBA userform. The Listview showing the data inserted by user in 3 text boxes (after clicking on 'save' button). The user may insert text in hebrew, but in the listview the text is shown as Gibberish (see screenshot in the link below).
Please your help to show the Hebrew text in the listview.
The code of 'save' button:
Private Sub CB_Save_Click()
Set Item = ListView2.ListItems.Add()
counter = counter + 1
Item.Text = counter
Item.SubItems(1) = T_Problem.Value
Item.SubItems(2) = T_ItemT.Value
Item.SubItems(3) = T_ActionDesc.Value
End Sub
Do the following:
Select the ListView in Developer Mode
Press F4
Press Fonts
Select Script > Hebrew
Ok
Try this (taken from spreadsheet1.com), originally written to support Chinese but works all the same for Hebrew
Open Control Panel
Click Region
Click the Administrative tab
Click the Change system locale button Select which language to use when displaying text in programs, such as VBE, that do not support
Unicode. The setting will affect all user accounts on your computer.

Function keys not working on MacOs with external Mac keyboard?

Example: according to the menu, the keyboard shortcut for Find Usages should be option F7.
When I use the built-in keyboard, and actually press fn + Shift + 7 ... it works as expected.
When I use my external Magic 2 Apple keyboard, and press option + F7 ... nothing happens?!
What am I doing wrong?
Update: I just figured that my external keyboard has a fn key as well. So when I press fn + option + F7 that works. But that is super cumbersome (the fn key is to the right of backspace, it is hard to press that together with any function key).
Change the behavior of function keys on your Mac document is probably what you are looking for:
If you prefer the top row of keys to always behave as standard
function keys without holding the Fn key:
Choose System Preferences from the Apple menu.
Click Keyboard.
Click the Keyboard tab if it's not already highlighted.
Select "Use all F1, F2, etc. keys as standard function keys"

how to create dynamic text label autohotkey

I'm trying to create a program that will show me in a text label, the color value of the x,y positions given in Edit fields.
The problem is that it will only work once and after it will not refresh. It is not a problem about the value itself since the value is correctly updated when I use a MsgBox.
See my following code:
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#SingleInstance, force
Gui, Add, Text,, X ;xpos label
Gui, Add, Edit, vxpos Number ;xpos to be entered by user
Gui, Add, Text,, Y ;ypos label
Gui, Add, Edit, vypos Number ;ypos to be entered by user
Gui, Add, Button, Default, GetColor ;to get the color
Gui, Add, Text,, vmyRGB ;color value that should be displayed
Gui, Show, AutoSize
Return
ButtonGetColor: ;called when pressing the button
Gui, Submit, NoHide ;retrieves values of my edit fields
PixelGetColor, myColor, %xpos%, %ypos% ;pixelcolor in my myColor variable
GuiControl,, vmyRGB, %myColor% ;updates my text field with the variable value, working once
MsgBox, %myColor% ;checks the value of my variable, always working
Return
Need some help on this, thank you :)
Well, after some more research using different keywords, I found out a solution:
replacing
Gui, Add, Text,, vmyRGB ;color value that should be displayed
by
Gui, Add, Text, vmyRGB, %myRGB% ;color value that should be displayed
and replacing
GuiControl,, vmyRGB, %myColor% ;updates my text field with the variable value, working once
by
GuiControl, Text, myRGB, %myColor% ;updates my text field with the variable value

Sublime Text - shortcut for setting the vertical selection

Since the beginning of the week I have to work with Debian, and one of the pbm I find with Sublime Text is that the vertical selection I used to use with Ctrl+left click is catched by the OS (it selects the current window to move).
I tried to edit the key-binding file of Sublime Text, but I could not find the line corresponding to vertical selection.
Do you know where it is? How can I change the default shortcut for vertical selection?
I think this is exactly what you are searching for:
enter link description here
~/.config/sublime-text-3/Packages/User/Default (Linux).sublime-mousemap
[
// Map column select to 4th mouse button.
{
"button": "button4",
"press_command": "drag_select",
"press_args": {"by": "columns"}
}
]

How to Select Columns in Editors (Atom,Notepad++, Kate, VIM, Sublime, Textpad,etc) and IDEs (NetBeans, IntelliJ IDEA, Eclipse, Visual Studio, etc) [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Closed 1 year ago.
Locked. This question and its answers are locked because the question is off-topic but has historical significance. It is not currently accepting new answers or interactions.
How to select columns in Editors and IDEs to columnar delete, insert or replace some characters ?
Editors:
Atom
Notepad++
Kate
VIM
Sublime
Emacs
Textpad
Emerald Editor
UltraEdit
MCEdit
jEdit
Nedit
IDEs:
NetBeans
Eclipse
Visual Studio
IntelliJ IDEA
Flash Builder
Aptana Studio
Notepad++, Visual Studio, and some others: Alt + drag.
vim: Ctrl + v or (bizarrely enough) Quad-click-drag. In windows: Ctrl + Q (since Ctrl + V is the standard for paste)
In Kate toggle Ctrl + shift + B .
In Netbeans 7.1 can select columns (Rectangular Selection) with Ctrl + shift + R . There is also a button in the code editor available.
This is how rectangular selections look like:
Eclipse used to need a column mode plugin to be able to select a rectangular selection.
Since Eclipse 3.5, you just need to type Alt+Shift+A: see its News and Noteworthy section. (On OS X it's Option-Command-A.)
Or activate the 'Editor Presentation' action set ( Window > Customize Perspective menu) to get a tool bar button for toggling the block selection mode.
AmbroseChapel adds in the comments:
This is a toggle.
Columnar selection is a mode you enter and leave: in other words, Eclipse switches into a mode where all mouse selections have to be columnar and you stay in that mode until you switch back (by using the same command again).
It's not like other editors where columnar selections are enabled only while certain keys are down.
In vim column visual mode is Ctrl + v. If that is what you meant?
SublimeText 2, 3, and 4
Using the Mouse
Different mouse buttons are used on each platform:
OS X
Left Mouse Button + Option
OR: Middle Mouse Button
Add to selection: Command
Subtract from selection: Command+Shift
Windows
Right Mouse Button + Shift
OR: Middle Mouse Button
Add to selection: Ctrl
Subtract from selection: Alt
Linux
Right Mouse Button + Shift
Add to selection: Ctrl
Subtract from selection: Alt
Using the Keyboard
OS X
ctrl + shift + ↑
ctrl + shift + ↓
Windows
ctrl + alt + ↑
ctrl + alt + ↓
Linux
ctrl + alt + ↑
ctrl + alt + ↓
Source: SublimeText2 Documentation
You didn't explicitly state emacs, but since you've highlighted lots of editors...
In emacs, you can use rectangles for this, where a column is a rectangle of width 1.
To create a rectangle, mark the top-left and bottom-right of the rectangle (where the bottom-right mark is one to the right of the further right point included in the rectangle. You can then manipulate via:
C-x r k
Kill the text of the region-rectangle, saving its contents as the "last killed rectangle" (kill-rectangle).
C-x r d
Delete the text of the region-rectangle (delete-rectangle).
C-x r y
Yank the last killed rectangle with its upper left corner at point (yank-rectangle).
C-x r o
Insert blank space to fill the space of the region-rectangle (open-rectangle). This pushes the previous contents of the region-rectangle rightward.
M-x clear-rectangle
Clear the region-rectangle by replacing its contents with spaces.
M-x delete-whitespace-rectangle
Delete whitespace in each of the lines on the specified rectangle, starting from the left edge column of the rectangle.
C-x r t string RET
Replace rectangle contents with string on each line. (string-rectangle).
M-x string-insert-rectangle RET string RET
Insert string on each line of the rectangle.
In IntelliJ IDEA, you can switch the selection mode with Alt + Shift + Insert combination. You can also column select by keeping the middle mouse button (i.e. the scroll wheel button) pressed and dragging.
on Kate
Ctrl + Shift + B also allows you to add more columns by simply clicking anywhere and paste it.
I used this when saving text files I copied from Google Translate as a side-by-side view.
This feature is not available in older versions of Netbeans (up to 7.1) and the plugin is not supported anymore.
A plugin is now available for NetBeans 6.9.
In TextMate with the mouse: start a selection and keep alt pressed while you move the cursor.
Without the mouse: first select normally using ⇧ and arrows then hit alt and move the cursor.
in Notepad++ , you can select a particular column holding ctrl + alt + shift and then left click mouse button and drag to select.
In TextPad:
With the mouse, Left-Click + Alt + Drag. Note that if you first use Alt, and then Click-and-drag, it does not work (at least for me). Ctrl+Alt instead of Alt also Works.
For pure keyboard, no mouse, enable Block Select Mode with Ctrl+Q, B.
Or use the sequence Alt, C, B, to do it via the Configure menu.
Warning 1: if Word Wrap is enabled, then Block Select Mode will not be available (which is somewhat logical). First disable Word Wrap. This was causing me some trouble, and this gave me the answer.
Warning 2: if you mean to insert text in every selected row by typing, you have to use Edit, Fill Block. Other editors let you type in directly.
In Ultra Edit and Crimson (or Emerald) Editor you can enable/disable the column mode with Alt + C
In textpad.
Go to left top of the page.
hold "shift key
Now use right arrow key to select column.
Now click "down arrow" key.
And the entire column will be selected.
jEdit:
With the keyboard: press Alt-\ (Opt-\ in Mac OS X) to toggle between rectangular and normal selection mode; then use Shift plus arrow keys to extend selection. You can switch back to regular selection mode with another Alt-\ (Opt-\ in Mac OS X), if desired.
With the mouse: Either use Alt-\ (Opt-\ in Mac OS X) as above to toggle rectangular selection mode, then drag as usual; or Ctrl-drag (Cmd-drag in Mac OS X). You can switch back to regular selection mode with another Alt-\ (Opt-\ in Mac OS X), if desired.
Actually, you can even make a non-rectangular selection the normal way and then hit Alt-\ (Opt-\ in Mac OS X) to convert it into a rectangular one.
In MCEdit toggle Shift+F3 (ie F13) or F9->Edit ->Mark columns.
P.S. In this case, MCEdit is an editor written for the Midnight Commander.
In Sublime3 (Windows):
Some users may get an inverted screen using the Ctrl+Alt+▲ in windows. To Solve this go to
Preferences->Key Bindings-User
And add these two lines at the end of the file just before closing brackets:
{ "keys": ["ctrl+alt+pageup"], "command": "select_lines", "args": {"forward": false} },
{ "keys": ["ctrl+alt+pagedown"], "command": "select_lines", "args": {"forward": true} }
Or use your own keys.
If you're using Nedit under Cygwin-X (or any platform for that matter), hold down the Ctrl key while selecting text with the left mouse.
Additionally, you can then drag the selected "box" around in an insert mode using the depressed left-mouse button or in overwrite mode by using Ctrl+left-mouse button.
With Nedit you can do several operations with selected column:
CTRL+LEFT-MOUSE -> Mark Rectangular Text-Area
MIDDLE-MOUSE pressed in area -> moving text area with pushing aside other text
CTRL+MIDDLE-MOUSE pressed in marked area -> moving text area with overriding aside text and deleting text from original position
CTRL+SHIFT+MIDDLE-MOUSE pressed in marked area -> copying text area with overriding aside text and keeping text from original position
In Flash Builder (v 4.5 and up), and Aptana Studio (at least v 2.0.5) there is a toolbar button to toggle block select. It is between the 'mark occurrences' and 'show whitespace characters' buttons. There is also a Alt + Shift + A shortcut. Not surprisingly, this is basically the same as for Eclipse, but I'm including here for completeness.
For any editor, you can use the below shortcuts. These shortcuts work for every text area also.
Shift + UpArrow/DownArrow - this will select text line by line
Ctrl + Shift + LeftArrow/RightArrow - this will select text word by word
Ctrl + BackSpace - this will delete text word by word