Search found 62 matches

by XShayanX
29 Sep 2020, 14:20
Forum: Ask For Help
Topic: Sleep stops the current thread - Does it really? Topic is solved
Replies: 2
Views: 62

Sleep stops the current thread - Does it really? Topic is solved

Code: Select all

i := 0
ToolTip, % i,0,0
SetTimer,x, 1000
x:
sleep, 5000
i++
ToolTip, % i,0,0
return
When you run the script:
At 0 seconds: Shows 0
At 6 seconds: Shows 2 ; Why did it skip 1?
At 11 seconds: shows 3
And keeps incrementing every 5 seconds ; Also why? Shouldn't it be every 6 seconds?
by XShayanX
28 Sep 2020, 08:16
Forum: Ask For Help
Topic: Weird issue with WheelDown/WheelUp Topic is solved
Replies: 15
Views: 478

Re: Weird issue with WheelDown/WheelUp Topic is solved

I don't know how I forgot to type {text} after I read your post. I can swear I remember I saw the {text} mode.
Anywho, thanks very much! :mrgreen:
by XShayanX
26 Sep 2020, 14:26
Forum: Ask For Help
Topic: Weird issue with WheelDown/WheelUp Topic is solved
Replies: 15
Views: 478

Re: Weird issue with WheelDown/WheelUp Topic is solved

If you use SendInput (or Send with SendMode Input) and have no other scripts with a keyboard hook, Send s should send {Shift up}s{Shift down} without any chance of interruption; i.e. any repeating Shift message would be postponed (by the system) until after Send completes. SendInput is generally th...
by XShayanX
25 Sep 2020, 05:28
Forum: Ask For Help
Topic: Performance Difference between #If and #IfWinActive Topic is solved
Replies: 6
Views: 152

Re: Performance Difference between #If and #IfWinActive Topic is solved

Hello again!
I have found out that #IfTimeout helps with the issue so that your mouse does not get stuck.
by XShayanX
25 Sep 2020, 04:47
Forum: Ask For Help
Topic: Weird issue with WheelDown/WheelUp Topic is solved
Replies: 15
Views: 478

Re: Weird issue with WheelDown/WheelUp Topic is solved

When you press and hold a key on the keyboard, the keyboard driver repeatedly generates key-down messages for that key until you release the key or press some other key. WheelDown is not a key, so if you hold Shift and scroll the wheel, the keyboard driver will still keep generating Shift key-down ...
by XShayanX
23 Sep 2020, 07:22
Forum: Ask For Help
Topic: Weird issue with WheelDown/WheelUp Topic is solved
Replies: 15
Views: 478

Re: Weird issue with WheelDown/WheelUp Topic is solved

That is interesting that you are seeing any "S" at all. I did not at my end. I am not sure why. AHK has some challenges with processing held keys. In some cases, small Sleeps are needed. I don't know whether it would help here. This is the result with Sleep: +WheelDown:: Sleep,100 Send s return ;sS...
by XShayanX
23 Sep 2020, 06:33
Forum: Ask For Help
Topic: Weird issue with WheelDown/WheelUp Topic is solved
Replies: 15
Views: 478

Re: Weird issue with WheelDown/WheelUp Topic is solved

I replicated your problem. I found that the following worked. +WheelDown:: BlockInput, On SendInput {Shift Up}s BlockInput, Off Return This is more elegant, the scroll down issue happens VERY LESS often, and capital S is sent less too: ;sssssssssssssssssssssSssssSssssssSssssssssssssssssssssssssssss...
by XShayanX
23 Sep 2020, 06:06
Forum: Ask For Help
Topic: Weird issue with WheelDown/WheelUp Topic is solved
Replies: 15
Views: 478

Re: Weird issue with WheelDown/WheelUp Topic is solved

Hmm, OK. Perhaps someone else has a solution. There are lots of postings about these "key down" issues. Some use GetKeyState to detect and alter the state of the keys. Same issue with GetKeyState() tbh: *WheelDown:: SendMode, Input ; SetKeyDelay, -1 ; SetMouseDelay, -1 if GetKeyState("LCtrl", "P") ...
by XShayanX
23 Sep 2020, 05:24
Forum: Ask For Help
Topic: Weird issue with WheelDown/WheelUp Topic is solved
Replies: 15
Views: 478

Re: Weird issue with WheelDown/WheelUp Topic is solved

One of the issues with AHK is that the modifier keys can become stuck. A variety of posts discuss it. I have found a simple workaround that I insert into some of my routines. SendEvent {Shift Up} Hello! But this: *+WheelDown:: SendEvent {Shift Up} Send,{s} return Causes the same issue, types capita...
by XShayanX
23 Sep 2020, 04:40
Forum: Ask For Help
Topic: Weird issue with WheelDown/WheelUp Topic is solved
Replies: 15
Views: 478

Weird issue with WheelDown/WheelUp Topic is solved

Hello! The issue as you can see in the video is that when I spam the WheelDown, it randomly scrolls down and sometimes randomly types capital S. https://streamable.com/srw558 How can I fix the issue? Keyboard hook and Mouse hook are both installed as you can see. Without them, I had the same issue. ...
by XShayanX
21 Sep 2020, 15:00
Forum: Ask For Help
Topic: Performance Difference between #If and #IfWinActive Topic is solved
Replies: 6
Views: 152

Re: Performance Difference between #If and #IfWinActive Topic is solved

Hello! The LShift + WheelDown/WheelUp, on some programs like Notepad++, has a weird issue: It scrolls horizontally and vertically both at the same time! So, I digged deep to see where the problem comes from and I found out If you don't use LShift, this problem doesn't happen: WheelUp::WheelLeft Whee...
by XShayanX
19 Sep 2020, 08:20
Forum: Ask For Help
Topic: What goes down under the hood when you scroll horizontally with touchpad
Replies: 0
Views: 80

What goes down under the hood when you scroll horizontally with touchpad

Hello. There are some programs that don't support scrolling horizontally (Shift + WheelUp/WheelDown) but you can use WheelLeft/WheelRight to scroll: Notepad++ (old versions) Microsoft OneNote for Windows 10 Some other programs don't even support WheelLeft/WheelRight: Microsoft Excel AHK Studio What ...
by XShayanX
18 Sep 2020, 05:16
Forum: Ask For Help
Topic: Is it a known bug where after sometime the AHK script will not be able to see mouse wheel events? Topic is solved
Replies: 4
Views: 113

Re: Is it a known bug where after sometime the AHK script will not be able to see mouse wheel events? Topic is solved

@BoBo Hello mister, this is not a gaming question, I'm actually using #If !WinActive("ahk_group Games") because I want my script's hotkeys to NOT WORK on games.
by XShayanX
18 Sep 2020, 03:57
Forum: Ask For Help
Topic: Performance Difference between #If and #IfWinActive Topic is solved
Replies: 6
Views: 152

Performance Difference between #If and #IfWinActive Topic is solved

Which one of these is the best practice to write AHK scripts: #IfWinActive: SetTitleMatchMode, 2 SendMode, Input #IfWinActive OneNote for Windows 10 ahk_exe ApplicationFrameHost.exe *WheelUp:: if GetKeyState("LShift", "P") Send, {WheelLeft} else Send, {WheelUp} return *WheelDown:: if GetKeyState("LS...
by XShayanX
18 Sep 2020, 03:03
Forum: Ask For Help
Topic: Is it a known bug where after sometime the AHK script will not be able to see mouse wheel events? Topic is solved
Replies: 4
Views: 113

Is it a known bug where after sometime the AHK script will not be able to see mouse wheel events? Topic is solved

Hello! I have been having this problem that after some time when I run my script, the WheelDown/WheelUp hotkeys stop working on Full Screen Windows (like when you hit F11 on Google Chrome), and I have to reload my script and they work again. When I check 'Key History And Info', I see that Wheel even...
by XShayanX
20 Aug 2020, 08:38
Forum: Ask For Help
Topic: Send active window to the bottom of the z-order Topic is solved
Replies: 3
Views: 122

Re: Send active window to the bottom of the z-order Topic is solved

@just me
Thanks very much for your answer.
Do you also happen to know how to move the position of a window in the z-order?
Like, I want to move the position of an inactive window in the z-order.

Go to advanced search