Search found 864 matches
- 11 May 2024, 19:19
- Forum: Ask for Help (v1)
- Topic: Need Advice on Finding My Missing { bracket
- Replies: 10
- Views: 807
Re: Need Advice on Finding My Missing { bracket
This is where I always thought that a text editor with color coding would come in handy. I use Notepad++ for everything because I find it the easiest. You can color-code your text as well. Problem is, the color coding doesn't save with the file so next time you re-open your text file, the color codi...
- 06 May 2024, 00:34
- Forum: Ask for Help (v1)
- Topic: PixelGetColor search in a specified region relative to cursor
- Replies: 4
- Views: 466
Re: PixelGetColor search in a specified region relative to cursor
thanks guys I just saw this now. Ended up going with an other approach for my task, which was probably a better way to go. Thanks boiler for the 3x3 square of 9 pixels info, it makes total sense now. It would have made more sense for me to explain that I was maybe looking for a 5x5 square of 25 pixe...
- 25 Apr 2024, 21:05
- Forum: Ask for Help (v1)
- Topic: PixelGetColor search in a specified region relative to cursor
- Replies: 4
- Views: 466
Re: PixelGetColor search in a specified region relative to cursor
After a bit more searching I found something a little closer but still doesn't work: CoordMode, Pixel, Screen CoordMode, Mouse, Screen ^j:: MouseGetPos, mX, mY X1 := mX Y1 := mY X2 := (mX + 100) Y2 := (mY + 100) PixelSearch, OutputVarX, OutputVarY, %X1%, %Y1%, %X2%, %Y2%, 0xffff9c, 1, Fast if (Error...
- 25 Apr 2024, 20:44
- Forum: Ask for Help (v1)
- Topic: PixelGetColor search in a specified region relative to cursor
- Replies: 4
- Views: 466
PixelGetColor search in a specified region relative to cursor
Hi guys/gals back with another fun one (yeah right).. I'm looking for the color under the cursor, but not just one pixel. It would need to be, say, 5 pixels in all 4 directions outwards from the cursor tip. So in other words, PixelGetColor searches a single pixel under the cursor (as far as I know),...
- 21 Apr 2024, 21:45
- Forum: Ask for Help (v1)
- Topic: Sendinput Won't Send ! Within A Variable
- Replies: 10
- Views: 273
Re: Sendinput Won't Send ! Within A Variable
Excellent, thank you to both you guys. This is brand new territory for me, I've never come across this sort of problem before so I would have never got it. I've never had a need for text mode until today. As with every tip provided here on the forums, I always save the snippets of code that you guys...
- 21 Apr 2024, 20:20
- Forum: Ask for Help (v1)
- Topic: Sendinput Won't Send ! Within A Variable
- Replies: 10
- Views: 273
Re: Sendinput Won't Send ! Within A Variable
oh thanks V0RT3X, just saw your reply now. Let me try that out and see how it goes.. gotta step out for an hour or so but I'll report back then
- 21 Apr 2024, 20:19
- Forum: Ask for Help (v1)
- Topic: Sendinput Won't Send ! Within A Variable
- Replies: 10
- Views: 273
Re: Sendinput Won't Send ! Within A Variable
This is the code in a nutshell: Variable1:=PaintbrushTool- Variable2:=This Is The Text To Send - But(Will It Work!?) Variable3:=(Variable1 Variable2) Msgbox, %Variable3% controlfocus, Edit1, ahk_class OWL.Dock ;this is the edit box in the "Notes" panel in Photoshop Sleep, 1000 ;give time for the foc...
- 21 Apr 2024, 16:59
- Forum: Ask for Help (v1)
- Topic: Sendinput Won't Send ! Within A Variable
- Replies: 10
- Views: 273
Re: Sendinput Won't Send ! Within A Variable
man, I don't know. Tried Send, SendInput, SendEvent and no dice. Saw that to send an ! mark there might be a requirement for it to be enclosed in curly brackets but the problem is, the ! is embedded in Variable2 so I don't know how to interrupt the pasting of Variable2 when it reaches the ! mark in ...
- 21 Apr 2024, 16:43
- Forum: Ask for Help (v1)
- Topic: Sendinput Won't Send ! Within A Variable
- Replies: 10
- Views: 273
Re: Sendinput Won't Send ! Within A Variable
thanks mikey let me check it out
- 21 Apr 2024, 16:34
- Forum: Ask for Help (v1)
- Topic: Sendinput Won't Send ! Within A Variable
- Replies: 10
- Views: 273
Sendinput Won't Send ! Within A Variable
Hey again.. back with another complicated question that I can't figure out: I have three variables which are: Variable1 Variable2 Variable3 Variable1 contains MyTextToPaste- Variable2 contains This Is The Text To Send - But(Will It Work!?) Variable3 contains Variable1 and Variable2 side by side. I u...
- 16 Apr 2024, 21:23
- Forum: Ask for Help (v1)
- Topic: Phantom line being written?
- Replies: 3
- Views: 110
Re: Phantom line being written?
Edit- ok great, it works perfectly now. The extra line is not being written. I would have never figured it out, so thanks again boiler
- 16 Apr 2024, 21:07
- Forum: Ask for Help (v1)
- Topic: Phantom line being written?
- Replies: 3
- Views: 110
Re: Phantom line being written?
Thanks boiler, that works. Gives me something to work with here. Still can't get it going in my main project though, it's doing the same thing (adding an extra line at the bottom) for some reason. I'll take a closer look and then report back to this topic
- 16 Apr 2024, 20:25
- Forum: Ask for Help (v1)
- Topic: Phantom line being written?
- Replies: 3
- Views: 110
Phantom line being written?
Somewhat related to the previous topic, this code reads a .txt file from the hard drive, reverses its contents, and then writes the amended data back to the hard drive again (it creates a new file, it doesn't overwrite the original). The original file (MyTest1.txt) looks like: one two three four fiv...
- 16 Apr 2024, 17:58
- Forum: Ask for Help (v1)
- Topic: Read from variable instead of text file
- Replies: 10
- Views: 240
Re: Read from variable instead of text file
Found a simple solution on the forums. fileread, str, C:\MyTestFile.txt s:=StringReverse(str, "`n") msgbox, %s% Return StringReverse(str, Separator="", OmitChars="") { Loop,Parse,% StrReplace(str,Separator,(BS:=chr(8))),%BS%,%OmitChars% i := A_LoopField (a_index=1 ? "" : BS i) Return StrReplace(i, B...
- 16 Apr 2024, 17:39
- Forum: Ask for Help (v1)
- Topic: Read from variable instead of text file
- Replies: 10
- Views: 240
Re: Read from variable instead of text file
So here I am working on this code some more (a little project I have going) and I've come to realise that I'd like to reverse the contents of "str" immediately after it's loaded in from the file. So in other words the text file would be upside down (or find a way to make "str" upside down, if that m...
- 15 Apr 2024, 20:31
- Forum: Ask for Help (v1)
- Topic: Read from variable instead of text file
- Replies: 10
- Views: 240
Re: Read from variable instead of text file
Perfect, thanks a lot!! Your help is much appreciated. I actually tried that syntax but I forgot to include the brackets so it didn't work. Oh well lesson learned. I'll keep this topic going if I come across any other issues with the code.
- 15 Apr 2024, 17:30
- Forum: Ask for Help (v1)
- Topic: Read from variable instead of text file
- Replies: 10
- Views: 240
Re: Read from variable instead of text file
wow, this is awesome. It works perfectly! I'm going to keep working with this and develop it more into my code. Curious, how would I pop up a messagebox when it hits either boundary ("one" or "ten"), something like, msgbox Upper Limit Reached! or msgbox, Lower Limit Reached! I'm guessing it has some...
- 15 Apr 2024, 16:42
- Forum: Ask for Help (v1)
- Topic: Read from variable instead of text file
- Replies: 10
- Views: 240
Re: Read from variable instead of text file
actually I think I got it: fileread, str, C:\MyTest.txt line := StrSplit(str, "`n", "`r") n := 0, line := StrSplit(str, "`n", "`r") WheelUp:: ToolTip % line[n := Max(1, n - 1)] WheelDown::ToolTip % line[n := Min(line.Count(), n + 1)] Is this now reading from the variable instead of the hard drive on...
- 15 Apr 2024, 16:38
- Forum: Ask for Help (v1)
- Topic: Read from variable instead of text file
- Replies: 10
- Views: 240
Re: Read from variable instead of text file
thanks mikeyww! It works
Question- how do I load the text file in as the variable instead of pre-defining it inside the () brackets as your code is right now?
Question- how do I load the text file in as the variable instead of pre-defining it inside the () brackets as your code is right now?
- 15 Apr 2024, 15:07
- Forum: Ask for Help (v1)
- Topic: Read from variable instead of text file
- Replies: 10
- Views: 240
Read from variable instead of text file
Hi all This is going to be a complicated question but I'll do my best... c:\MyTextFile.txt contains: one two three four five six seven eight nine ten When scrolling with WheelUp or WheelDown, the code reads each individual line of text in the file and displays the data as a tooltip. For example: A s...