Search found 293 matches

by Osprey
17 Mar 2018, 17:19
Forum: Ask For Help
Topic: Trouble with Multiple Copy/Paste Function
Replies: 5
Views: 232

Re: Trouble with Multiple Copy/Paste Function

Try modifying the parameters of ClipWait. For example, try ClipWait, 2, 1. That's my only idea at the moment.
by Osprey
08 Feb 2018, 16:31
Forum: Ask For Help
Topic: How to place text cursor?
Replies: 4
Views: 130

Re: How to place text cursor?

You could automate the Find dialog, if the text viewer supports it... something like: Send, ^{home}^f ; Ctrl+Home moves the caret to the start of the document. Ctrl+F opens the Find dialog. WinWait, Find Send, Text string to find{enter}{esc}^{left} ; Enter begins the search. Esc closes the Find dial...
by Osprey
08 Feb 2018, 15:57
Forum: Ask For Help
Topic: How to place text cursor?
Replies: 4
Views: 130

Re: How to place text cursor?

You could do it by sending the left arrow key once while the text is still selected to un-select it and move the caret to the start of the line, then sending the right arrow key a number of times equal to the position that you retrieved with InStr.
by Osprey
08 Feb 2018, 15:50
Forum: Ask For Help
Topic: Trying to make advance SingleInstance force Topic is solved
Replies: 8
Views: 282

Re: Trying to make advance SingleInstance force Topic is solved

If I'm understanding your situation correctly, it's the same that I had and which I addressed with this little function: ; Check if a script of the same name is already running (from a different location) and, if so, close the older process CheckProcess() { PID := DllCall("GetCurrentProcessId&q...
by Osprey
08 Feb 2018, 15:27
Forum: Ask For Help
Topic: PixelSearch saying it found the right color even though it's not there
Replies: 2
Views: 72

Re: PixelSearch saying it found the right color even though it's not there

As Exaskryz suggested might be the case, your Errorlevel logic is backwards. PixelSearch returns 0 if the color is found and 1 if it was not found, so you need to do: if ErrorLevel { MsgBox, Color not found! break } else { tooltip, color currently found Sleep 500 tooltip } Note the removed exclamati...
by Osprey
05 Feb 2018, 19:18
Forum: Ask For Help
Topic: Get the key code of omen command center button Topic is solved
Replies: 10
Views: 1103

Re: Get the key code of omen command center button Topic is solved

Since it's an omen, have you tried a scan code of 666? ;)

Seriously, have you snooped around the registry yet to see if your keyboard driver has added any mappings to the registry?

https://www.experts-exchange.com/articl ... eyond.html
by Osprey
03 Feb 2018, 18:46
Forum: Ask For Help
Topic: "KeyWait" - press key valid only if ...
Replies: 3
Views: 111

Re: "KeyWait" - press key valid only if ...

I thought that you wanted KeyWait to trigger over the GUI. If you want it to trigger over the original window, I think that setting up a hotkey for "k" may be more suitable. Try this: ;loop ;{ ifwinactive ahk_group xxx { wingettitle, Light, A WinGetPos, x, y, w, h, A Gui, +Lastfound +Toolw...
by Osprey
03 Feb 2018, 16:09
Forum: Ask For Help
Topic: "KeyWait" - press key valid only if ...
Replies: 3
Views: 111

Re: "KeyWait" - press key valid only if ...

Try something like this: loop { ifwinactive ahk_group xxx { wingettitle, Light, A WinGetPos, x, y, w, h, A Gui, +Lastfound +Toolwindow iw:= w + 24 ih:= h + 24 w:= w + 42 h:= h + 42 x:= x - 2 - border_thickness k y:= y - 2 - border_thickness Gui, Color, FFFF00 Gui, -Caption WinSet, Region, 0-0 %w%-0 ...
by Osprey
03 Feb 2018, 15:09
Forum: Ask For Help
Topic: Get the key code of omen command center button Topic is solved
Replies: 10
Views: 1103

Re: Get the key code of omen command center button Topic is solved

Try the following script. It'll display the name, VK code and SC code for each key pressed. CoordMode, ToolTip, Screen CleanTimer := -3000 ; Must be a negative number (the timer will run only once) Loop, 5000 { Hotkey, % "~*" GetKeyName(Format("vk{:x}", a_index - 1)), GetText Hot...
by Osprey
03 Feb 2018, 04:29
Forum: Ask For Help
Topic: [Q] assignment and value
Replies: 4
Views: 133

Re: [Q] assignment and value

"^+s" is not alpha-numeric. You can see this by simplifying your code to: ProgramKey := [] ProgramKey.cmd := "^+s" temp := ProgramKey["cmd"] If temp is alnum MsgBox, That is alpha-numeric! The condition is not satisfied; whereas, if you change "^+s" to, simply...
by Osprey
03 Feb 2018, 03:49
Forum: Ask For Help
Topic: Get the current directory of the active program
Replies: 5
Views: 162

Re: Get the current directory of the active program

The first method detailed here should be something that's easily scriptable in AutoHotkey:

https://www.extendoffice.com/documents/ ... older.html
by Osprey
02 Feb 2018, 17:46
Forum: Ask For Help
Topic: Responsive GUI Topic is solved
Replies: 3
Views: 149

Re: Responsive GUI Topic is solved

Have you tried using the built-in A_ScreenWidth and A_ScreenHeight variables? GuiWidth := A_ScreenWidth*0.50 GuiHeight := A_ScreenHeight*0.50 Gui, New Gui, Show, W%GuiWidth% H%GuiHeight% Return GuiClose: ExitApp Return Replace "50" on each of the first two lines with the percentages that y...
by Osprey
02 Feb 2018, 00:31
Forum: Ask For Help
Topic: get key state and wildcard Topic is solved
Replies: 2
Views: 82

Re: get key state and wildcard Topic is solved

Try putting the wildcard in the hotkey label, instead, like so:

by Osprey
31 Jan 2018, 13:26
Forum: Ask For Help
Topic: Permanent Tooltip in the Upper Right-Hand corner of screen
Replies: 9
Views: 256

Re: Permanent Tooltip in the Upper Right-Hand corner of screen

Thanks for that link, jeeswg. Osprey, I tried what you posted, and it works great on its own, but it renders the rest of my code inoperable as it is in a loop...and so is my code. Do you have any suggestions on how I would incorporate your code with mine? The script that I gave contains a loop, but ...
by Osprey
31 Jan 2018, 02:59
Forum: Ask For Help
Topic: Permanent Tooltip in the Upper Right-Hand corner of screen
Replies: 9
Views: 256

Re: Permanent Tooltip in the Upper Right-Hand corner of screen

The following will put a permanent tooltip in the upper left corner that displays keypresses: CoordMode, ToolTip, Screen Loop, 5000 { Hotkey, % "~*" GetKeyName(Format("vk{:x}", a_index - 1)), GetText Hotkey, % "~*" GetKeyName(Format("sc{:x}", a_index - 1)), Ge...
by Osprey
29 Jan 2018, 00:27
Forum: Ask For Help
Topic: Gui Editbox does not cancel? Topic is solved
Replies: 3
Views: 95

Re: Gui Editbox does not cancel? Topic is solved

Yeah, just do:

Code: [Select all]GeSHi © Codebox Plus

TranslatorGUIShow:
Gui, TranslatorGUI: Show, AutoSize, TranslatorGUI
return
by Osprey
29 Jan 2018, 00:23
Forum: Ask For Help
Topic: Trigger thread as long as "key1" & "key2" were pressed within "x" time of each other?
Replies: 7
Views: 227

Re: Trigger thread as long as "key1" & "key2" were pressed within "x" time of each other?

Try this: #MaxThreadsPerHotkey 2 ~1:: If (A_PriorHotkey = "Space") and (A_TimeSincePriorHotkey < 20) Goto, MySubroutine Return ~9:: If (A_PriorHotkey = "Space") and (A_TimeSincePriorHotkey < 20) Goto, MySubroutine Return Space:: If (A_PriorHotkey = "~1") and (A_TimeSinc...
by Osprey
28 Jan 2018, 23:24
Forum: Ask For Help
Topic: Gui Editbox does not cancel? Topic is solved
Replies: 3
Views: 95

Re: Gui Editbox does not cancel? Topic is solved

Your lines that add the edit boxes are inside of the hotkey, so new edit boxes will be added each time that you use the hotkey. If you want them added only when you start the script, move all but the Show line outside of your hotkey. #SingleInstance, force TranslatorGUI: Gui, TranslatorGUI: Add, Edi...
by Osprey
28 Jan 2018, 23:10
Forum: Ask For Help
Topic: Trigger thread as long as "key1" & "key2" were pressed within "x" time of each other?
Replies: 7
Views: 227

Re: Trigger thread as long as "key1" & "key2" were pressed within "x" time of each other?

I understand but doing it either way doesn't do anything to solve my issue. The issue is that sometimes, while I'm pressing a lot of other keys, I'll accidentally release 1 before I press 9 and miss out on triggering my thread. Basically, I want to trigger my thread even if I make a slight mistake ...

Go to advanced search