Search found 320 matches

by Osprey
02 Feb 2018, 00:31
Forum: Ask For Help
Topic: get key state and wildcard Topic is solved
Replies: 2
Views: 200

Re: get key state and wildcard Topic is solved

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

Code: Select all

f10::
Suspend
return

*f::
  While GetKeyState("f","P")
  {
    send, {3}   
    click
    Sleep, 450
    send, {2}
    click
    Sleep, 450
  }
Return
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: 536

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: 536

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)), GetText } ; "~" keeps the button original ...
by Osprey
29 Jan 2018, 00:27
Forum: Ask For Help
Topic: Gui Editbox does not cancel? Topic is solved
Replies: 3
Views: 193

Re: Gui Editbox does not cancel? Topic is solved

Yeah, just do:

Code: Select all

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: 437

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_TimeSincePriorHotkey < 800) Goto, MySu...
by Osprey
28 Jan 2018, 23:24
Forum: Ask For Help
Topic: Gui Editbox does not cancel? Topic is solved
Replies: 3
Views: 193

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: 437

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 ...
by Osprey
28 Jan 2018, 21:50
Forum: Ask For Help
Topic: Enter F2 When Windows Starts
Replies: 1
Views: 93

Re: Enter F2 When Windows Starts

Just make Send, {F2} your whole script and then add it to Windows' startup. You can do the latter by creating a shortcut in C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup that points to the AutoHotkey executable with the path to the script as its parameter (or you can compile the scrip...
by Osprey
28 Jan 2018, 21:39
Forum: Ask For Help
Topic: Trigger thread as long as "key1" & "key2" were pressed within "x" time of each other?
Replies: 7
Views: 437

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

You shouldn't be trying to press them down at the same time. You should be pressing and holding the 1 key first and then pressing the 9 key second, like how you hold shift down and then press keys that you want to capitalize.
by Osprey
28 Jan 2018, 17:46
Forum: Ask For Help
Topic: Gosub GUI appears Multiple times despite #SingleInstance force Topic is solved
Replies: 3
Views: 132

Re: Gosub GUI appears Multiple times despite #SingleInstance force Topic is solved

#SingleInstance force applies to the script, itself, not to the GUIs that may be created and shown in it.
by Osprey
28 Jan 2018, 16:18
Forum: Ask For Help
Topic: Toggle Button with 2 states of delay Topic is solved
Replies: 5
Views: 222

Re: Toggle Button with 2 states of delay Topic is solved

Try this: ;<<<<<<<<<< Ctrl + Shit + NumPad Minus >>>>>>>>>>>>>>> $^+NumpadSub:: KeyWait, NumpadSub, T2 If ErrorLevel ; If KeyWait's timeout expired (i.e. NumpadSub was held for at least 2 seconds) { Send, {NumpadPlus} KeyWait, NumpadSub ; Wait for NumpadSub to be released, so that this hotkey isn't ...
by Osprey
28 Jan 2018, 15:45
Forum: Ask For Help
Topic: Having trouble with MouseGetPos in this script.
Replies: 2
Views: 104

Re: Having trouble with MouseGetPos in this script.

As the error suggests, remove the % symbols from around "var1" (and "var2"). MouseGetPos puts values into variables; it doesn't retrieve them (like MouseMove, which you do need to use % symbols for). Also, SendInput and your MouseMove need to be on separate lines. ~alt:: MouseGetPos, var1, var2 Send...
by Osprey
28 Jan 2018, 15:37
Forum: Ask For Help
Topic: Struggling with infinite loop
Replies: 6
Views: 229

Re: Struggling with infinite loop

Your loop is likely not ending immediately because you have over 3 seconds of sleeps in it that it needs to complete every time. If you want it to end earlier, you can put more checks for LoopRunning into your While. I would probably try something like this: 2:: LoopRunning := 1 OuterLoop: while (Lo...
by Osprey
27 Jan 2018, 18:46
Forum: Ask For Help
Topic: playsound and overlay text
Replies: 6
Views: 287

Re: playsound and overlay text

You can use SplashImage to display overlay text. For example: SplashImage, , B W200, The image was found! Sleep, 2000 SplashImage, Off If you want to play the sound slightly after the text is displayed, rather than slightly before, you can move your SoundPlay line to after the first SplashImage line.
by Osprey
27 Jan 2018, 18:06
Forum: Ask For Help
Topic: Defining a word/letter as an input?
Replies: 2
Views: 141

Re: Defining a word/letter as an input?

It sounds like you want to use hotstrings : ::Red::1 ::Blue::2 ::Green::3 Just put that in your code and delete your ~Space hotkey (which isn't needed). Using the * option may be more what you want, though: :*:Red::1 :*:Blue::2 :*:Green::3 That doesn't require you to press space to trigger it and om...
by Osprey
27 Jan 2018, 18:02
Forum: Ask For Help
Topic: Help! Shift hotkey can't trigger Send {Shift Down} ?
Replies: 3
Views: 344

Re: Help! Shift hotkey can't trigger Send {Shift Down} ?

FYI, you could simply do +<#Home::Send, +{Home}. The Return isn't necessary when the hotkey is only one line.
by Osprey
26 Jan 2018, 22:19
Forum: Ask For Help
Topic: how to press a vertical bar and move a little
Replies: 4
Views: 217

Re: how to press a vertical bar and move a little

If you're going to try to click on the scrollbar and drag it, you're liable to run into all kinds of problems, since it'll be tricky to know where to click. On long documents/pages, the part that you can drag could be teeny tiny and be anywhere along the height of the window. It'd likely be much sim...
by Osprey
26 Jan 2018, 06:10
Forum: Ask For Help
Topic: SendPlay Click doesn't work in windows 10
Replies: 4
Views: 255

Re: SendPlay Click doesn't work in windows 10

I've never gotten SendPlay to work, with or without admin rights. I do use Windows 10. SendEvent always works, without fail, so try just using that.
by Osprey
25 Jan 2018, 20:46
Forum: Ask For Help
Topic: If condition with several ORs
Replies: 4
Views: 229

Re: If condition with several ORs

Try this: ;Excel test ^F12:: Loop, 5 { i++ Send {F2} Sleep, 50 Send +{Home} Sleep, 5 Send ^c Sleep, 5 Send {F2} Sleep, 5 Send {Right} Sleep, 5 if i = 1 { value1 = %clipboard% } if i = 2 { value2 = %clipboard% } if i = 3 { value3 = %clipboard% } if i = 4 { value4 = %clipboard% } if i = 5 { value5 = %...
by Osprey
24 Jan 2018, 22:15
Forum: Ask For Help
Topic: Invalid HotKey {RShift Down} {RShift Up}- why ?
Replies: 4
Views: 258

Re: Invalid HotKey {RShift Down} {RShift Up}- why ?

RShift:: will trigger when the Right Shift key is pressed down. RShift Up:: will trigger when the Right Shift key is released. You can use either by itself or both.

Go to advanced search