Search found 17 matches

by Sojiro84
04 Feb 2019, 14:13
Forum: Forum Issues
Topic: Requesting an Admin to handle a spam post
Replies: 19
Views: 3958

Re: Requesting an Admin to handle a spam post

For a quick moment there I thought my account was hacked. Forum bug? I can't remember ever subscribing to any notifications for any topic.
by Sojiro84
29 Jul 2018, 16:54
Forum: Ask For Help
Topic: AutoHotkey "Continue" statement causing high CPU usage.
Replies: 4
Views: 863

Re: AutoHotkey "Continue" statement causing high CPU usage.

Rohwedder wrote:Hallo,
after one of the "Continue" instructions, it always return immediately to the beginning of the loop.
But if there is no Sleep, this is done many many times per second, not only about 4 times. A lot of work for the CPU!
Off course! That makes a lot of sense. Thanks for the explanation. :)
by Sojiro84
29 Jul 2018, 03:13
Forum: Ask For Help
Topic: AutoHotkey "Continue" statement causing high CPU usage.
Replies: 4
Views: 863

Re: AutoHotkey "Continue" statement causing high CPU usage.

Hallo, move your "Sleep, 222" from the end to the beginning of the Loop or better, replace the Loop with a Timer. Hot damn, this worked! Now the script uses less then 0.50% CPU usage at all times! I have not yet done the Timer thing, I will look into that later, but just moving the sleep command to...
by Sojiro84
29 Jul 2018, 02:07
Forum: Ask For Help
Topic: AutoHotkey "Continue" statement causing high CPU usage.
Replies: 4
Views: 863

AutoHotkey "Continue" statement causing high CPU usage.

Good day everyone! I need a little help with my script. In my script, I center the active window. This works with very very little CPU usage. But, I dont want to center everything, so I have made some exceptions where the script shouldt do anything. This has been done with the "Continue" statement. ...
by Sojiro84
07 Aug 2016, 16:04
Forum: Ask For Help
Topic: How to do 2 things with 1 button press. Topic is solved
Replies: 3
Views: 1152

Re: How to do 2 things with 1 button press. Topic is solved

Try ~Pause:: Suspend GetKeyState, state, Pause, T if state=D { msgbox Pause=Off } else { msgbox Pause =On } Pause,,1 return You have to add a code for the closing of Firefox as well. Thanks! This worked perfectly. Also left out the suspend as the other suggested but this is what I needed. Awesome!
by Sojiro84
04 Aug 2016, 03:51
Forum: Ask For Help
Topic: How to do 2 things with 1 button press. Topic is solved
Replies: 3
Views: 1152

How to do 2 things with 1 button press. Topic is solved

Greetings all!, I looked up online but couldn't quite get what I want. When I press the Pause button on my keyboard I want my Firefox process to be closed and than afterwards I want the script to be paused. Pressing the Pause button again resumes the script. I tried a doing the Pause statement twice...
by Sojiro84
28 Jul 2016, 02:15
Forum: About This Community
Topic: Can AHK be considered a bonafide programming language?
Replies: 13
Views: 15273

Re: Can AHK be considered a bonafide programming language?

In other languages, if something is easy to do for beginners, then it has no value (think of "Hello World" program...or a loop that does nothing but add 1+1 a 1000 times), while to get something of value to you, you need to learn a lot first. And in AHK, you can get value/usefulness, for your prese...
by Sojiro84
14 Jul 2016, 09:15
Forum: Ask For Help
Topic: How to exclude multiple .exe's in my script?
Replies: 1
Views: 695

How to exclude multiple .exe's in my script?

Hi all, Anyone know how to exclude multiple .exe processes from my script? I managed with the help from here to exclude classes in a simple way like so: If Class Contains DV2ControlHost,Button,BaseBar,ClockFlyoutWindow,ClassicShell.CMenuContainer,BuddyWindow,TVPopup,Shell_TrayWnd,TaskListThumbnailWn...
by Sojiro84
05 Apr 2016, 09:01
Forum: Offtopic
Topic: Why do you use AHK?
Replies: 31
Views: 10572

Re: Why do you use AHK?

I discovered this app after trying a lot of programs and googling a lot for a solution to find something that would automatically center windows for me. I am a bit OCD and like my stuff pixel perfect and used all kinds of stuff like windowfx to square windows neatly in corners or another program tha...
by Sojiro84
02 Apr 2016, 14:14
Forum: Ask For Help
Topic: Detect which monitor window is and center there
Replies: 7
Views: 2711

Re: Detect which monitor window is and center there

winHandle := WinExist("A") ; The window to operate on ; Don't worry about how this part works. Just trust that it gets the ; bounding coordinates of the monitor the window is on. ;-------------------------------------------------------------------------- VarSetCapacity(monitorInfo, 40), NumPut(40, ...
by Sojiro84
02 Apr 2016, 11:32
Forum: Ask For Help
Topic: Detect which monitor window is and center there
Replies: 7
Views: 2711

Re: Detect which monitor window is and center there

Thanks for making it shorther but it is by far simple haha. Did you looked at the code I made? What you are giving me I cant understand what it does at all and I cant believe it should be this complicated? Currently I made your code into this, tried to 'merge' it in my code but offcourse it didnt wo...
by Sojiro84
01 Apr 2016, 12:16
Forum: Ask For Help
Topic: Detect which monitor window is and center there
Replies: 7
Views: 2711

Re: Detect which monitor window is and center there

This example should help show how to get the correct monitor for a window. ; Press Win+X to show info about the monitor the active window is on ; Detect which monitor window is and center there - https://autohotkey.com/boards/viewtopic.php?t=15501 ; reference - autohotkey.com/board/topic/45289-maxi...
by Sojiro84
01 Apr 2016, 05:15
Forum: Ask For Help
Topic: Detect which monitor window is and center there
Replies: 7
Views: 2711

Detect which monitor window is and center there

First, here is my script: http://p.ahkscript.org/?p=71d53022 I have been doing some more work on it today since I now use multiple monitors and I feel like I might be close but I can;t figure out what I do wrong. My script centers the active window in the screen. Currently it keeps centering on the ...
by Sojiro84
11 Feb 2016, 07:35
Forum: Ask For Help
Topic: Problem with checking for current window position
Replies: 1
Views: 560

Problem with checking for current window position

So I have the following script (script auto-centers window content): http://p.ahkscript.org/?p=9d0ec8e5 The part where I have a problem is the following: WinGetPos,,, X, Y, A If (X >= 1920, Y >= 1080) Continue [b] If (WinGetPos,,, X, Y, A == (TotalWorkSpaceHorizontal/2)-(X/2), (TotalWorkSpaceVertica...
by Sojiro84
06 Feb 2016, 14:44
Forum: Ask For Help
Topic: need help to make a array and compare the content to current active window
Replies: 3
Views: 967

Re: need help to make a array and compare the content to current active window

Found it! The link you gave me had the answer:

Code: Select all

	WinGetClass, Class, A
		
	If Class contains DV2ControlHost,BaseBar  
		Continue 
I knew there had to be a short and simple way for my simple script and there it is. Thanks a ton!
by Sojiro84
06 Feb 2016, 14:40
Forum: Ask For Help
Topic: need help to make a array and compare the content to current active window
Replies: 3
Views: 967

Re: need help to make a array and compare the content to current active window

Example: array:=["Red","Blue","Yellow"] detectedcolor=green primary:=false Loop % array.MaxIndex() If (detectedcolor=array[A_Index]) primary:=true If primary MsgBox The color found was primary else MsgBox The color found was not primary ; the array is still defined, so now we just need to change th...
by Sojiro84
06 Feb 2016, 14:01
Forum: Ask For Help
Topic: need help to make a array and compare the content to current active window
Replies: 3
Views: 967

need help to make a array and compare the content to current active window

Allright, to start, here is my script so far; http://p.ahkscript.org/?p=b09242f0 I have a script to center windows for me. After using it for a while I had to make exceptions for certain windows. Now, I make a new line for every window that should not be affected but this should and probably can, be...

Go to advanced search