Search found 94 matches

by partof
08 Apr 2019, 04:19
Forum: Ask For Help
Topic: hotkey bugs if I keep pressing it too long (how to release the key that I'm pressing?) Topic is solved
Replies: 1
Views: 140

Re: hotkey bugs if I keep pressing it too long (how to release the key that I'm pressing?) Topic is solved

the solution was : KeyWait LWin, L It means: wait for windows key to be released before resuming the code Full code: #If WinActive("Google Docs ahk_class Chrome_WidgetWin_1") #a:: { KeyWait LWin, L ; Wait for # to be released. send, ^; ; set upperscript sleep, 100 ; send, al ; sleep, 200 ; time to s...
by partof
04 Apr 2019, 10:15
Forum: Ask For Help
Topic: script needs to be reload twice to take in account the changes
Replies: 0
Views: 79

script needs to be reload twice to take in account the changes

In my ahk scripts that stores all my key remapping, I have this little piece of code so that I can easily reload it after I made some edits. ^+r:: If WinActive("ahk_shortcuts.ahk") ; this will be called when I run the shortcut when my active window is my script in VS Code { Send ^s ; send ctrl s sav...
by partof
04 Apr 2019, 03:32
Forum: Ask For Help
Topic: hotkey bugs if I keep pressing it too long (how to release the key that I'm pressing?) Topic is solved
Replies: 1
Views: 140

hotkey bugs if I keep pressing it too long (how to release the key that I'm pressing?) Topic is solved

This code work as expected, until I press the # for too long. In this case it send another "#a" (the # I press + the a of the "al" it sent) which log off the computer (it's an inbuilt hotkey I would desactivate if I could). #a:: { Send {# up} send, al } return I also tried using {Blind} (I first tho...
by partof
31 Mar 2019, 14:26
Forum: Scripts and Functions
Topic: (using only the mouse to go forward/backward on youtube) + (enable/disable all youtube hotkeys with a single hotkey)
Replies: 0
Views: 177

(using only the mouse to go forward/backward on youtube) + (enable/disable all youtube hotkeys with a single hotkey)

When you right click + left click this code activates/deactivates some custom hotkeys for youtube (eg: jump forward, backward...). It works only when the active window is youtube (so it won't bother you elsewhere). ; ********************************* (using only the mouse to go forward/backward on y...
by partof
31 Mar 2019, 14:15
Forum: Ask For Help
Topic: Can't highlight text using LButton even if it has been remaped to it's original states (after using it as hotkey) Topic is solved
Replies: 2
Views: 151

Re: Can't highlight text using LButton even if it has been remaped to it's original states (after using it as hotkey) Topic is solved

That was it, thank you so much!

The explanation:
When we use the tilde as prefix the hotkey will fire when the key is pressed instead of being delayed until the key is released source: (https://autohotkey.com/docs/Hotkeys.htm)
~LButton & RButton::
by partof
30 Mar 2019, 11:41
Forum: Ask For Help
Topic: Can't highlight text using LButton even if it has been remaped to it's original states (after using it as hotkey) Topic is solved
Replies: 2
Views: 151

Can't highlight text using LButton even if it has been remaped to it's original states (after using it as hotkey) Topic is solved

I have a bug in this script that I can't fix. I want the remap of WheelDowWheelUp to left/right to work only on a youtube page but I would like to be able to enable/disable this remaping with the double click on LButton & RButton anywhere (on any active page, not just on youtube). (The toggle : = 0 ...
by partof
30 Mar 2019, 11:28
Forum: Ask For Help
Topic: enable/disable a shortcut using another shortcut Topic is solved
Replies: 4
Views: 252

Re: enable/disable a shortcut using another shortcut Topic is solved

Thank you It's working! (Here is my code, I still have a small issue with it, but it's for another question) SetTitleMatchMode, Regex toggle := 0 youtubesetting(toggle){ ;|This will only go off if toggle is true/1 If (toggle==1){ #If WinActive("YouTube") TrayTip, On, Youtube mode activated,,1 Hotkey...
by partof
29 Mar 2019, 13:57
Forum: Ask For Help
Topic: enable/disable a shortcut using another shortcut Topic is solved
Replies: 4
Views: 252

enable/disable a shortcut using another shortcut Topic is solved

How can I enable and disable the shortcuts below by pressing both the RButton and the LButton? Any advice will be welcome! SetTitleMatchMode, 2 WinActivate, YouTube RButton:: Send, {Space} return SetTitleMatchMode, 2 WinActivate, YouTube WheelUp:: Send, {Right} return SetTitleMatchMode, 2 WinActivat...
by partof
28 Mar 2019, 03:33
Forum: Ask For Help
Topic: Run a script every specified weekday at specified time (use ahk instead of task manager) Topic is solved
Replies: 8
Views: 516

Re: Run a script every specified weekday at specified time (use ahk instead of task manager) Topic is solved

Thanks Sote for this code, I didn't think about do it that way. It's better than relying on a count down!
by partof
22 Mar 2019, 09:34
Forum: Ask For Help
Topic: Run a script every specified weekday at specified time (use ahk instead of task manager) Topic is solved
Replies: 8
Views: 516

Re: Run a script every specified weekday at specified time (use ahk instead of task manager) Topic is solved

Thanks nou, this is indeed a better way to do it. Sote, I run into this problem today. I put my computer into sleep and all my tasks were disorganized. I do not want ahk to wake up my computer. I only need my task to be display when I log back in my computer after a sleep. Ex: I have a task set for ...
by partof
21 Mar 2019, 11:36
Forum: Ask For Help
Topic: Run a script every specified weekday at specified time (use ahk instead of task manager) Topic is solved
Replies: 8
Views: 516

Re: Run a script every specified weekday at specified time (use ahk instead of task manager) Topic is solved

So far, Iwas able to do this: SleepTill(1610,"1,3,5") SleepTill(Time, date:=0) { ST_weekday:=A_WDay if (%ST_weekday% in date){ ST_Hour:=SubStr(Time, 1 ,2) ST_Min:=SubStr(Time, 3 ,2) ST_Sec:=(SubStr(Time, 5 ,2)<>"" ? SubStr(Time, 5 ,2) : "00") STime:=(((ST_Hour-A_Hour)*60+(ST_Min-A_Min))*60+(ST_Sec-A...
by partof
21 Mar 2019, 10:22
Forum: Ask For Help
Topic: Run a script every specified weekday at specified time (use ahk instead of task manager) Topic is solved
Replies: 8
Views: 516

Run a script every specified weekday at specified time (use ahk instead of task manager) Topic is solved

I would like to replace my 50+ tasks manager with ahk. I am not sure if this is the best way of doing it but thanks to this https://autohotkey.com/board/topic/88278-help-to-close-and-open-a-program-at-a-specific-time/?p=560220 I found the sleeptill function https://autohotkey.com/board/topic/51576-s...
by partof
11 Mar 2019, 06:54
Forum: Ask For Help
Topic: how to Exitapp when I close the message box clicking on close cross? Topic is solved
Replies: 2
Views: 166

Re: how to Exitapp when I close the message box clicking on close cross? Topic is solved

My bad! It was actually working, I was runing another file with the same name. I thank you and apologize for wasting your time. For those interested: This (last part of the script) will only exitApp if you click on the ok button to close the msgbox: ButtonOK: ExitApp Return This will exitApp if you ...
by partof
11 Mar 2019, 06:37
Forum: Ask For Help
Topic: how to Exitapp when I close the message box clicking on close cross? Topic is solved
Replies: 2
Views: 166

how to Exitapp when I close the message box clicking on close cross? Topic is solved

Sorry, it's very basic, but I can't fin the answer. My app exit when I press the ok button with the following code, but not when I close I close it by clicking on the cross: Gui,1: +AlwaysOnTop +ToolWindow +HwndMyWinHwnd Gui, Color, Yellow Gui, Margin, 50, 50 Gui, Add, Text, x50 y20, test) Gui, Add,...
by partof
03 Mar 2019, 01:07
Forum: Scripts and Functions
Topic: AutoHotkey: how to restart the script when the ctrl control key is stuck
Replies: 1
Views: 254

AutoHotkey: how to restart the script when the ctrl control key is stuck

^ESC:: ; so you can reload when the ctrl key is stuck by just pressing escape Reload Sleep 1000 ; If successful, the reload will close this instance during the Sleep, so the line below will never be reached. ; MsgBox, 4,, The script could not be reloaded. Would you like to open it for editing? ; If...
by partof
17 Jan 2019, 14:24
Forum: Ask For Help
Topic: Loop (and create a countdown) on a var created from args
Replies: 2
Views: 238

Re: Loop (and create a countdown) on a var created from args

Sorry for the delay and thanks so much as it's working great!
by partof
13 Jan 2019, 14:48
Forum: Ask For Help
Topic: Loop (and create a countdown) on a var created from args
Replies: 2
Views: 238

Loop (and create a countdown) on a var created from args

I am starting my ahk script from a python scrip with an argument "number" (which is an integer but set as a string variable): subprocess.call([path_ahk_exe, path_ahk_script_countdown, number]) Then in the ahk script I need to create a Tooltip that countdown from the time set in the args. If Number i...
by partof
10 Jan 2019, 12:48
Forum: Ask For Help
Topic: Disable the key alt when it's pressed alone (while allowing to work in combination with other keys). Topic is solved
Replies: 2
Views: 209

Re: Disable the key alt when it's pressed alone (while allowing to work in combination with other keys). Topic is solved

Guten abend Rohwedder und danke schoen!

It's insulting of simplicity but it's working, so I'll worship your name for the rest of my life!

Thanks again!
by partof
10 Jan 2019, 10:38
Forum: Ask For Help
Topic: Disable the key alt when it's pressed alone (while allowing to work in combination with other keys). Topic is solved
Replies: 2
Views: 209

Disable the key alt when it's pressed alone (while allowing to work in combination with other keys). Topic is solved

In many apps, such as chrome pressing alt lose the focus (the cursor goes to the menu) I'm struggling to find the way to disable that simple keystroke without losing all my shortcuts which work with the alt and others keys (ex: alt+x). Any idea? This stack answer https://superuser.com/a/615424/23575...
by partof
31 Dec 2018, 11:11
Forum: Ask For Help
Topic: Current Hour & Current Minute
Replies: 6
Views: 599

Re: Current Hour & Current Minute

Code: Select all

:*:hhh:: ; >> 17h10
SendInput %A_Hour%h%A_Min%
return


:*:hhs:: ; >> 17:10:53
SendInput %A_Hour%:%A_Min%:%A_Sec%
return

Go to advanced search