Search found 552 matches

by MaxAstro
04 Mar 2019, 10:45
Forum: Ask For Help
Topic: Script Failing to Run Via Task Scheduler
Replies: 0
Views: 112

Script Failing to Run Via Task Scheduler

I'm trying to set up a simple script that refreshes a browser window every hour automatically. The script itself is straightfoward and works fine: #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. ; #Warn ; Enable warnings to assist with detecting common errors....
by MaxAstro
14 Aug 2018, 11:58
Forum: Ask For Help
Topic: Excel COM: Column to the Right of Arbitrary Column Topic is solved
Replies: 1
Views: 251

Excel COM: Column to the Right of Arbitrary Column Topic is solved

Situation: I have a piece of data in a given column. The column might be one letter, or it might be two letters. I need to retrieve the data one column to the right. I'm at a bit of a loss. Next row is easy; just add one to the variable. But I can't seem to figure out next column.
by MaxAstro
18 Jun 2018, 12:59
Forum: Ask For Help
Topic: #IfMousePluggedIn?
Replies: 1
Views: 214

#IfMousePluggedIn?

Got a new tablet lately, and I'm pretty happy with it, but I'd like to write a script to improve the function of the pen. Unfortunately, I also use a mouse with the tablet occasionally, and the script would mess with the mouse. Is there any way to have a hotkey function only if there is no mouse plu...
by MaxAstro
15 Jun 2018, 16:08
Forum: Ask For Help
Topic: Trouble Coding Topic is solved
Replies: 4
Views: 394

Re: Trouble Coding Topic is solved

That's actually fairly clever. I think the problem is that toggle is being interpreted as a string in the if statement, so it's always true. Try changing if toggle to if (toggle).
by MaxAstro
01 Jun 2018, 09:49
Forum: Ask For Help
Topic: AHK 2.0 Question
Replies: 2
Views: 298

AHK 2.0 Question

I have a fairly large script that I use day-to-day, consisting of a dozen or so files and thousands of lines of code, all written in AHK1. I've heard AHK2 mentioned a few times, but never in great detail. How complicated is it to port a script from AHK1 to AHK2? What are the advantages of doing so? ...
by MaxAstro
31 May 2018, 15:22
Forum: Ask For Help
Topic: Double left mouse click remap
Replies: 5
Views: 506

Re: Double left mouse click remap

Slight correction - you have your ands and ors backwards. It should be (false AND false AND false), or (true OR true OR true); (!WinActive || !WinActive) will always be true, and (WinActive && WinActive) will never be true, since only one window can be active at once.
by MaxAstro
31 May 2018, 14:32
Forum: Ask For Help
Topic: Sound file doesnt play unless I press Enter?
Replies: 15
Views: 1238

Re: Sound file doesnt play unless I press Enter?

To play the sound, you'll probably need to use SetTimer to create a loop that checks for the window to be active. Check out these pages in the docs:

Code: Select all

SetTimer
WinActive()
by MaxAstro
31 May 2018, 14:27
Forum: Ask For Help
Topic: need a little help to finish my script off please
Replies: 3
Views: 343

Re: need a little help to finish my script off please

Instead of click maybe try Send {LButton down}? You'll need to manually send LButton Up when the mouse is released, though.
by MaxAstro
29 May 2018, 15:48
Forum: Ask For Help
Topic: Replacing a key (Click & Drag) Topic is solved
Replies: 2
Views: 306

Re: Replacing a key (Click & Drag) Topic is solved

Maybe try this?

Code: Select all

*XButton1:: Send {LButton down}
*XButton1 up:: Send {LButton up}
by MaxAstro
29 May 2018, 15:07
Forum: Ask For Help
Topic: OVercoming Firefox Quantum limitation
Replies: 5
Views: 489

Re: OVercoming Firefox Quantum limitation

Hmm... In pseudocode, you'd probably want to do something like this: LButton:: GetMousePos ImageSearch, PictureOfNewTabButton.jpg if (MouseX and MouseY are within range of image) doURLentry() Slightly complex, but shouldn't be that hard; getting the coordinates right on the imagesearch is probably g...
by MaxAstro
29 May 2018, 09:11
Forum: Ask For Help
Topic: Replace function of arrow key Topic is solved
Replies: 3
Views: 348

Re: Replace function of arrow key Topic is solved

I assume that your code that remaps up to right shift looks something like this: Up:: Send {RShift} return By default, hotkeys can trigger other hotkeys. So when you do Send {Up} , the "up" that you are sending triggers the "up" hotkey and sends RShift instead. To prevent this, the $ modifier stops ...
by MaxAstro
25 May 2018, 16:14
Forum: Gaming
Topic: Quickscope script
Replies: 7
Views: 652

Re: Quickscope script

~LButton works because LButton is shoot. Try this:

Code: Select all

LButton::
	Send ^m
	Sleep 1000
	Send {LButton down}
	return
by MaxAstro
25 May 2018, 14:22
Forum: Ask For Help
Topic: Replace function of arrow key Topic is solved
Replies: 3
Views: 348

Re: Replace function of arrow key Topic is solved

What is most like happening is that the up you are sending is triggering your up hotkey. Try adding the $ modifier to the up hotkey.
by MaxAstro
24 May 2018, 09:40
Forum: Ask For Help
Topic: If element is highlighted, show text box
Replies: 4
Views: 404

Re: If element is highlighted, show text box

Interesting, I didn't know there was a system message for that. Looking at the list of system messages, though, isn't 0x202 LButton up?
by MaxAstro
24 May 2018, 09:01
Forum: Ask For Help
Topic: If element is highlighted, show text box
Replies: 4
Views: 404

Re: If element is highlighted, show text box

You could do this with a tooltip and a background loop, yes. You can have the loop call MouseGetPos, which can return the control under the mouse. If the control under the mouse is the image, display the tooltip, otherwise turn it off.
by MaxAstro
18 May 2018, 09:58
Forum: Ask For Help
Topic: How to triggerbot with multiple pixel images under certain condition syntax...
Replies: 2
Views: 424

Re: How to triggerbot with multiple pixel images under certain condition syntax...

My first guess is that your if statements are not blocked correctly. Put the expression in parenthesis and add a { to the end of each, like this: If (Errorlevel = 0) { Then, after the mouse click, add this: }}}}}}}}}}}}}}}}}}
by MaxAstro
18 May 2018, 09:17
Forum: Wish List
Topic: Switch/Case statement
Replies: 14
Views: 8784

Re: Switch/Case statement

Bumping this because my script is full of ugly walls of if/else and a switch/case implementation would be so much easier to read, not to mention more aesthetically pleasing.
by MaxAstro
17 May 2018, 15:10
Forum: Wish List
Topic: (Forum Suggestion) Code Block Links
Replies: 0
Views: 434

(Forum Suggestion) Code Block Links

The fact that keywords inside code blocks automatically link to documentation is awesome. However, there's no easy way to link to the documentation on parse/read/file loops. For example, all of the following just link to the basic loop documentation: Loop, Read Loop, Parse Loop, File Would it be pos...
by MaxAstro
17 May 2018, 15:03
Forum: Ask For Help
Topic: CSV to fields from another program Topic is solved
Replies: 4
Views: 437

Re: CSV to fields from another program Topic is solved

This should be fairly easy to do with two loops, a file read loop and a CSV parse loop. Here is an example: FileSelectFile, FilePath Loop, Read, %FilePath% { ;Any code that needs to be executed for each line of the CSV file goes here Loop, Parse, A_LoopReadLine, CSV { ;Inside this loop, the variable...
by MaxAstro
17 May 2018, 09:04
Forum: Ask For Help
Topic: Run script on program startup, and then turn off script on program shutdown
Replies: 2
Views: 325

Re: Run script on program startup, and then turn off script on program shutdown

Alternatively, you could use if statements and #IfWinExist statements to make the script only do anything when the software is running, and then the script can just run all the time.

Go to advanced search