Search found 26 matches

by doctorafterman
09 Jun 2020, 11:56
Forum: Ask For Help
Topic: Incrementing variable names? Topic is solved
Replies: 2
Views: 113

Incrementing variable names? Topic is solved

I'm trying to find the simplest way to change which variable is being used based on input. I use variables to paste blocks of text including line breaks and I need to change which one is swapped out. I'd like to use a CountVar to find TextTemplateN and call the correct variable based on the number o...
by doctorafterman
11 Mar 2020, 16:14
Forum: Ask For Help
Topic: Parsing a string
Replies: 1
Views: 191

Parsing a string

Is there any way to take a string and find a variable, then parse something immediately after that variable? I have pieces of information that will always appear in the string i.e. "DOB" followed by a line break and the data I need to parse. This is always in a different location so I need to find t...
by doctorafterman
03 Nov 2019, 11:17
Forum: Ask For Help
Topic: Keep right click from doing anything Topic is solved
Replies: 3
Views: 609

Re: Keep right click from doing anything Topic is solved

Great, when you say bottom of my script does that matter whether it's inside the hotkey or loop or can it be anywhere in the ahk file? Never used context sensitive hotkeys before Put the following lines at the bottom of your script: #If InLoop RButton:: return #If At the start of the loop, add this:...
by doctorafterman
29 Oct 2019, 15:57
Forum: Ask For Help
Topic: Keep right click from doing anything Topic is solved
Replies: 3
Views: 609

Keep right click from doing anything Topic is solved

I have a script that runs on loop with macros controlled by my mouse, and mouse movement is off while looping. I run into a constant problem where I'm accidentally right clicking because the way my hand rests, and it screws up the script. Is there a way that I can prevent right click from being sent...
by doctorafterman
17 Oct 2019, 10:25
Forum: Ask For Help
Topic: Associative Array with variable as key - beginner question Topic is solved
Replies: 2
Views: 247

Re: Associative Array with variable as key - beginner question Topic is solved

Great thank you, the quotes make it more readable in Notepad++ anyway. This worked perfectly: StatesArray := {AL: "N", AR: "N", AZ: "N", CO: "N", FL: "N", GA: "Y", IA: "N", IL: "Y", IN: "Y", KS: "Y", KY: "N", LA: "N", MD: "Y", MI: "Y", MO: "Y", MS: "N", MT: "N", NC: "Y", NE: "N", NV: "Y", OH: "Y", O...
by doctorafterman
17 Oct 2019, 09:56
Forum: Ask For Help
Topic: Associative Array with variable as key - beginner question Topic is solved
Replies: 2
Views: 247

Associative Array with variable as key - beginner question Topic is solved

I'm new to associative arrays/objects, I'm trying to use a variable to lookup the key in the array. I'm expecting the MsgBox to return either Y or N (or a number in the future) based on the user input of a two letter state abbreviation. This is returning blank right now: StatesArray := {AL: N, AR: N...
by doctorafterman
07 Oct 2019, 10:34
Forum: Ask For Help
Topic: Go to next empty row (Excel/Sheets)
Replies: 4
Views: 775

Re: Go to next empty row (Excel/Sheets)

Great I'll check the forums for the invalid class string when using the excel handle. I'm on the latest AHK and Windows 10 The script should run "as is" and the hotkey should be triggered while Excel is open and the active cell is in that column. Search on the forum for "invalid class string". There...
by doctorafterman
07 Oct 2019, 07:17
Forum: Ask For Help
Topic: Go to next empty row (Excel/Sheets)
Replies: 4
Views: 775

Re: Go to next empty row (Excel/Sheets)

I'm going to take the time shortly to learn how the excel objects work - unfamiliar with the syntax now. Do I need to edit any of this for it to work? It gave me an error for invalid class string at the Xl := ComObjActive("Excel.Application") line Excel only. You can try something like this (win + b...
by doctorafterman
05 Oct 2019, 21:26
Forum: Ask For Help
Topic: Go to next empty row (Excel/Sheets)
Replies: 4
Views: 775

Go to next empty row (Excel/Sheets)

Hi, I'm using this code right now to go to the next empty cell in the column then go home to the first cell and fill out a new row. This is in an xlsx file in Google Sheets but if you have an Excel based solution I'll switch. It just takes too long at a second per 10 rows if I'm dealing with thousan...
by doctorafterman
26 Sep 2019, 10:15
Forum: Ask For Help
Topic: Totally stuck... Clipboard and Variable problem Topic is solved
Replies: 5
Views: 797

Re: Totally stuck... Clipboard and Variable problem Topic is solved

Great! I used your approach of keeping the clipboard clear and storing everything in variables, used Send %Variable% instead of pasting ^v, and used: While !Clipboard { ClipWait, 2 Send ^c } to ensure the clipboard fills before moving on. I have an emergency exitapp. Clipboard := Click %NameX%, %Nam...
by doctorafterman
25 Sep 2019, 14:02
Forum: Ask For Help
Topic: Totally stuck... Clipboard and Variable problem Topic is solved
Replies: 5
Views: 797

Re: Totally stuck... Clipboard and Variable problem Topic is solved

Examples of copied text below. The name is changed to always be Title case and the phone number uses regex to change it to just a 10 digit without 1 at the beginning. Click %NameX%, %NameY%, 2 sleep 100 Send ^c ;Example: Michael or MICHAEL Clipboard := StrReplace(Clipboard, "`r`n") sleep 100 ComObjC...
by doctorafterman
25 Sep 2019, 10:38
Forum: Ask For Help
Topic: Totally stuck... Clipboard and Variable problem Topic is solved
Replies: 5
Views: 797

Totally stuck... Clipboard and Variable problem Topic is solved

I have a very disruptive bug in my script. If anyone can 1. tell me why my Return isn't working to stop this or 2. help me figure out why this is happening and fix it all together I would be so grateful. What I expect this to do/what it does most of the time: Copy data from chrome from NameX/Y and N...
by doctorafterman
11 Sep 2019, 17:29
Forum: Ask For Help
Topic: Macro to disable mouse movement? Topic is solved
Replies: 2
Views: 712

Re: Macro to disable mouse movement? Topic is solved

Perfect I wasn't finding this by searching at all. I added MouseMoveOff at each point the loop would be broken. Beautiful solution.
boiler wrote:
11 Sep 2019, 09:59
This blocks mouse movement:
BlockInput, MouseMove

Make sure your script has the ability to turn it off and/or exit the script with a hotkey or something.
by doctorafterman
11 Sep 2019, 09:21
Forum: Ask For Help
Topic: Macro to disable mouse movement? Topic is solved
Replies: 2
Views: 712

Macro to disable mouse movement? Topic is solved

Hi, I know this is probably not an AHK question but in the off chance there's an AHK solution or anyone else has had the same issue, I need to somehow turn off the movement of my external mouse with a hotkey. My hotkeys are bound to this mouse but while the script is running, any mouse movement will...
by doctorafterman
03 Sep 2019, 10:34
Forum: Scripts and Functions
Topic: Interrupt Sleep: Toggle or Button Press
Replies: 0
Views: 584

Interrupt Sleep: Toggle or Button Press

I wrote the following code so I could interrupt sleep by toggling the hotkey or change the sleep period to an alternate (lesser) amount of time by pressing the assigned key (LCtrl). I don't know if anyone will find this particularly useful but it's a combination of a lot of pieces I've found here an...
by doctorafterman
30 Aug 2019, 19:47
Forum: Ask For Help
Topic: Click with variable as Y coordinate Topic is solved
Replies: 2
Views: 433

Click with variable as Y coordinate Topic is solved

Hi, I thought this would be simple but it doesn't seem to be working. The z hotkey below should click a coordinate based on the Y value of ScrollY..... Note: return omitted intentionally CoordMode, Mouse, Screen return Esc::ExitApp ScrollY = 900 ScrollWait = 3000 q:: ScrollY := ScrollY + 10 ScrollWa...
by doctorafterman
29 Aug 2019, 12:35
Forum: Ask For Help
Topic: StringLower not working inside my script
Replies: 1
Views: 317

StringLower not working inside my script

Hi, I tested StringLower outside my main script as below and it worked fine: ^+!c:: InputBox, LeadName if LeadName is upper StringLower, LeadName, LeadName, T Clipboard := LeadName Send ^v Clipboard := Return But when I put it inside my code it never applies StringLower to the variable LeadName. Sen...
by doctorafterman
29 Aug 2019, 11:01
Forum: Ask For Help
Topic: Interrupt While/Loop?
Replies: 3
Views: 491

Re: Interrupt While/Loop?

I need to interrupt the loop. I'm actually using this now and it works but I suppose I was wondering if there was a way to stop a loop at any point the HK is pressed rather than placing if-break statements everywhere? #MaxThreadsPerHotkey 2 CoordMode, Mouse, Screen Return f7:: Day1Run := !Day1Run If...
by doctorafterman
29 Aug 2019, 10:11
Forum: Ask For Help
Topic: Interrupt While/Loop?
Replies: 3
Views: 491

Interrupt While/Loop?

Hi, I'm trying to use the same hotkey to break my loop/while. Here's a simple example where I'm testing this by spamming myself with texts. I tried a loop toggle but that didn't work for me. Whenever the hotkey is pressed again I need the script to stop where it is, and if it's pressed another time ...
by doctorafterman
29 Aug 2019, 10:07
Forum: About This Community
Topic: Issues with registering, Post your username here...
Replies: 698
Views: 1124108

Re: Issues with registering, Post your username here...

Whelp. I'm active but I can't sign in with my email/username or password. Even if I wanted to change my password I get a message that my account doesn't exist. ?? I'm only in now by clicking the link from email... only way I can sign in. CodeKnight activated. Joe118: good :) doctorafterman is active...

Go to advanced search