Search found 105 matches
- 22 Nov 2016, 17:03
- Forum: Scripts and Functions (v1)
- Topic: My understanding of Global, Static and Local Variables
- Replies: 15
- Views: 5092
My understanding of Global, Static and Local Variables
I hope it's right (it's really giving me headaches): x = Main Script y = Main Script global z ;since this global variable is outside a function, All Functions will write\Read the same "z" variable from the Main Script, instead their own "z" variables z = Main Script ;so "z" is a "Super-Global" Varia...
- 21 Nov 2016, 23:04
- Forum: Ask for Help (v1)
- Topic: Why defining variables through Functions is too slow? Is there any workaround to make it faster?
- Replies: 23
- Views: 3894
Re: Why defining variables through Functions is too slow? Is there any workaround to make it faster?
The Function calling Times is not the problem here ..., defining the variables through the function is the problem! here is an example ("VarWrite" vs "ArrayWrite"): VarWrite (Called 5000 Times and took 9001 milliseconds to finish its task): File = VarWrite - VarRead (Test).txt gui, add, text, w300 r...
- 21 Nov 2016, 21:04
- Forum: Ask for Help (v1)
- Topic: Sequence of IF's evaluating two conditions
- Replies: 4
- Views: 789
Re: Sequence of IF's evaluating two conditions
ConA = On ConB = On ;if the first "if" succeed, all the "else if" and "else" below it will be skipped ;if the firts "if" fails and the first "else if" succeed, all the "else if" and "else" below the first "else if" will be skipped ;and so on ... If (ConA = "On" and ConB = "On") { ToolTip, ConA On \...
- 21 Nov 2016, 19:21
- Forum: Ask for Help (v1)
- Topic: Enter key to press button based on which editbox has focus Topic is solved
- Replies: 4
- Views: 2008
- 21 Nov 2016, 18:43
- Forum: Ask for Help (v1)
- Topic: Why defining variables through Functions is too slow? Is there any workaround to make it faster?
- Replies: 23
- Views: 3894
Why defining variables through Functions is too slow? Is there any workaround to make it faster?
Defining variables through Main Script is quite fast, but through functions is too slow! Why? Any workaround to make it faster? Example: Time = 30000 gui, add, text, w300 r10 center 0x200 , Please Wait!!! ;"0x200" center text vertically (but "`n" or "`r`n" will not represent new lines) gui, show, , ...
- 20 Nov 2016, 09:23
- Forum: Ask for Help (v1)
- Topic: Running 2 commands at the same time?
- Replies: 3
- Views: 3609
Re: Running 2 commands at the same time?
here is an "Fake Multi Thread" example using "SetTimer": gui, add, text, , E: gui, add, text, x+5 w50 vTextE, 0 gui, add, text, x+5, (Press "e" to Continue\Pause - Count every 1 Second) gui, add, text, xm, T: gui, add, text, x+5 w50 vTextT, 0 gui, add, text, x+5, (Press "t" to Continue\Pause - Count...
- 17 Nov 2016, 19:32
- Forum: Ask for Help (v1)
- Topic: RegEx Number Replace - How to treat Numbers as "Number" instead as "String"?
- Replies: 3
- Views: 945
Re: RegEx - How to treat Numbers as "Number" instead as "String"?
I came up with this: ;( )(*SKIP)(*F) ;any string that should be skipped, must be put inside the empty "( )" ;"|" The vertical bar separates two or more alternatives. A match occurs if any of the alternatives is satisfied. For example, gray|grey matches both gray and grey text = 1 - 11 - 21 - 310 - 1...
- 14 Nov 2016, 20:33
- Forum: Ask for Help (v1)
- Topic: RegEx Number Replace - How to treat Numbers as "Number" instead as "String"?
- Replies: 3
- Views: 945
RegEx Number Replace - How to treat Numbers as "Number" instead as "String"?
Example:
Text = 33 - 333 - 3421 ...
RegExMatch(Text, "3") => "RegExMatch" should return "0" because "Text" does not contain "Number" 3 !
RegExReplace(Text, "3", "9") => nothing should be replaced, because "Text" does not contain "Number" 3 !
Text = 33 - 333 - 3421 ...
RegExMatch(Text, "3") => "RegExMatch" should return "0" because "Text" does not contain "Number" 3 !
RegExReplace(Text, "3", "9") => nothing should be replaced, because "Text" does not contain "Number" 3 !
- 07 Nov 2016, 12:24
- Forum: Scripts and Functions (v1)
- Topic: [Function] VarWrite \ VarRead - A little bit faster alternative to IniWrite \ IniRead [Function]
- Replies: 3
- Views: 1626
Re: [Function] VarWrite \ VarRead - A little bit faster alternative to IniWrite \ IniRead [Function]
ListView Control (Test Speed - TickCount Added): 1000 Rows: VarWrite = 468 milliseconds \ VarRead = 499 milliseconds IniWrite = 32230 milliseconds \ IniRead = 1138 milliseconds 10000 Rows: VarWrite = 31450 milliseconds \ VarRead = 33946 milliseconds IniWrite = 400345 milliseconds \ IniRead = 41325 m...
- 04 Nov 2016, 19:07
- Forum: Ask for Help (v1)
- Topic: Compare 3 variables
- Replies: 6
- Views: 1632
Re: Compare 3 variables
This one is better: A = 1 B = 1 C = 1 LowestNumber = %C% ;could be "A" or "B" (I choosed "C") LowestVar = C if B = %LowestNumber% LowestVar .= " B" ;Add "B" in "LowestVar" if B < %LowestNumber% { LowestNumber = %B% LowestVar = B } if A = %LowestNumber% LowestVar .= " A" ;Add "A" in "LowestVar" if A ...
- 04 Nov 2016, 18:54
- Forum: Ask for Help (v1)
- Topic: Compare 3 variables
- Replies: 6
- Views: 1632
Re: Compare 3 variables
Hmm. Looking for the lowest value and then the variable that corresponds to that. Sorry, I didn't state that in my first post. I need the lowest value and then the variable it came from so I can then use that variable. I am not completely understanding your first post, but it seems that it wouldn't...
- 03 Nov 2016, 21:12
- Forum: Scripts and Functions (v1)
- Topic: [Function] VarWrite \ VarRead - A little bit faster alternative to IniWrite \ IniRead [Function]
- Replies: 3
- Views: 1626
[Function] VarWrite \ VarRead - A little bit faster alternative to IniWrite \ IniRead [Function]
RegEx proved to be too slow for this task, but anyway, "VarWrite \ VarRead" is a little bit faster than "IniWrite \ IniRead"! - New lines "`r`n" can be stored in the "Keys" (Extra Files) ListView Control (TickCount Speed Test) \ Edit Controls (New Lines "`r`n" test) VarWrite \ VarRead (Functions): V...
- 30 Oct 2016, 15:04
- Forum: Scripts and Functions (v1)
- Topic: [Function] Last Left Clicked Control [Function]
- Replies: 1
- Views: 1063
Re: [Function] Last Left Clicked Control [Function]
This line from the "Example" code:
if (A_ThisHotkey = "WheelDown" or "WheelUp")
Fixed to:
if (A_ThisHotkey = "WheelDown" or A_ThisHotkey = "WheelUp")
if (A_ThisHotkey = "WheelDown" or "WheelUp")
Fixed to:
if (A_ThisHotkey = "WheelDown" or A_ThisHotkey = "WheelUp")
- 29 Oct 2016, 20:51
- Forum: Ask for Help (v1)
- Topic: Defocus an AHK Listview Row?
- Replies: 5
- Views: 1659
Re: Defocus an AHK Listview Row?
I spoke too soon. It works fine on Windows 7 but with Windows 10 the listview seems permanently disabled - clicking on it does not regain focus. Just focus another control, a "text" control for example, and the Listview control will be unfocused! Example: gui, add, text, , This is a "Text" control ...
- 29 Oct 2016, 20:28
- Forum: Ask for Help (v1)
- Topic: AutoHotkey GUI: ListView, remove focus Topic is solved
- Replies: 6
- Views: 2605
Re: AutoHotkey GUI: ListView, remove focus Topic is solved
Also how to get the focus back when using Windows 10? The DllCall effectively disables the listview as once used the user can no longer interact with the listview. Works OK with Windows 7. - Store your listview control Hwnd id number into a variable - use "DllCall" or "ControlFocus" to set focus ba...
- 28 Oct 2016, 16:14
- Forum: Ask for Help (v1)
- Topic: Hotkeys - "If" Statement problem and "Send" problem!!!
- Replies: 5
- Views: 1193
Re: Hotkeys - "If" Statement problem and "Send" problem!!!
Woaw!!! "fuck it", "fuck off" ... you seem to be really a tough guy! I'm really afraid of you now!
- 28 Oct 2016, 11:19
- Forum: Ask for Help (v1)
- Topic: Hotkeys - "If" Statement problem and "Send" problem!!!
- Replies: 5
- Views: 1193
Re: Hotkeys - "If" Statement problem and "Send" problem!!!
The way I indent my codes, it's not of your business!!!guest3456 wrote: and for godsakes learn to indent your code.
- 28 Oct 2016, 09:36
- Forum: Ask for Help (v1)
- Topic: Hotkeys - "If" Statement problem and "Send" problem!!!
- Replies: 5
- Views: 1193
Hotkeys - "If" Statement problem and "Send" problem!!!
Gui, +HwndGuiId gui, add, text, , Close to Exit script Gui, show, w300 h200 return guiclose: ;________ Gui Close __________ exitapp WheelUp:: ;_________ Hotkeys ___________ WheelDown:: MButton:: F12:: +WheelUp:: ;"+" Shift + WheelUp +WheelDown:: ;"+" Shift + WheelDown +MButton:: +F12:: IfWinactive,...
- 28 Oct 2016, 08:25
- Forum: Ask for Help (v1)
- Topic: How to UnFocus All Controls from a Window?
- Replies: 4
- Views: 1587
- 27 Oct 2016, 20:17
- Forum: Scripts and Functions (v1)
- Topic: Gui Windows Drag and Drop - Show Dropped Files and Folders Separately
- Replies: 1
- Views: 1864
Gui Drag and Drop with some Conditions - Only Files - Only 1 File - Only specified Controls
Drag and Drop with some Conditions: - Only Files allowed (Folders not allowed) - Only 1 File allowed to be dropped at a time - File Drop allowed only on specified controls ;if "FileExist( )" return value contains "D" Attribute, a Directory\Folder was dropped, otherwise, a File was dropped ;"RegEx" i...