Search found 854 matches

by scriptor2016
16 Apr 2024, 21:23
Forum: Ask for Help (v1)
Topic: Phantom line being written?
Replies: 3
Views: 45

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 ;)
by scriptor2016
16 Apr 2024, 21:07
Forum: Ask for Help (v1)
Topic: Phantom line being written?
Replies: 3
Views: 45

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 ;)
by scriptor2016
16 Apr 2024, 20:25
Forum: Ask for Help (v1)
Topic: Phantom line being written?
Replies: 3
Views: 45

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...
by scriptor2016
16 Apr 2024, 17:58
Forum: Ask for Help (v1)
Topic: Read from variable instead of text file
Replies: 10
Views: 101

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...
by scriptor2016
16 Apr 2024, 17:39
Forum: Ask for Help (v1)
Topic: Read from variable instead of text file
Replies: 10
Views: 101

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...
by scriptor2016
15 Apr 2024, 20:31
Forum: Ask for Help (v1)
Topic: Read from variable instead of text file
Replies: 10
Views: 101

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. :)
by scriptor2016
15 Apr 2024, 17:30
Forum: Ask for Help (v1)
Topic: Read from variable instead of text file
Replies: 10
Views: 101

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...
by scriptor2016
15 Apr 2024, 16:42
Forum: Ask for Help (v1)
Topic: Read from variable instead of text file
Replies: 10
Views: 101

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...
by scriptor2016
15 Apr 2024, 16:38
Forum: Ask for Help (v1)
Topic: Read from variable instead of text file
Replies: 10
Views: 101

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?
by scriptor2016
15 Apr 2024, 15:07
Forum: Ask for Help (v1)
Topic: Read from variable instead of text file
Replies: 10
Views: 101

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...
by scriptor2016
15 Mar 2024, 18:00
Forum: Ask for Help (v1)
Topic: Use AHK script only when Photoshop is active - Photoshop WinTitle?
Replies: 2
Views: 83

Re: Use AHK script only when Photoshop is active - Photoshop WinTitle?

Those shortcuts look a little complicated, with the modifers and everything (CTRL, ALT, etc)

If you're interested, I could maybe help you out a little bit if you can describe what you want each shortcut to do.
by scriptor2016
24 Feb 2024, 02:24
Forum: Forum Issues
Topic: Documentation and Google
Replies: 27
Views: 1227

Re: Documentation and Google

oh ok never mind - found it, thanks
by scriptor2016
24 Feb 2024, 02:22
Forum: Forum Issues
Topic: Documentation and Google
Replies: 27
Views: 1227

Re: Documentation and Google

Sorry boiler, I'm not getting it - page 1 of what thread? (I haven't been here in a really long time so I'm kind of out of touch at the moment..)
by scriptor2016
24 Feb 2024, 01:50
Forum: Forum Issues
Topic: Documentation and Google
Replies: 27
Views: 1227

AHK topics not searchable in Chrome?

Hi everyone Long, long time. Playing around with AHK again , it'll take some time to become re-aquainted :) I'm searching for topics as I always did by typing in something like the following into a google search: "AHK clear an edit control" but nothing shows up in Google's search engine results anym...
by scriptor2016
07 Oct 2022, 23:50
Forum: Ask for Help (v1)
Topic: Program won't see key stroke
Replies: 5
Views: 650

Re: Program won't see key stroke

Amongst a few other things, I think you might need a hotkey to trigger the actions. In the case below, press SHIFT+z to run the code. It's been quite a while since I've used AHK due to "life", so I'm not sure this is going to work just yet. But you can try it out: +z:: If WinExist("ahk_class DigiApp...
by scriptor2016
28 Aug 2022, 13:17
Forum: Ask for Help (v1)
Topic: Is a Window Visible on Screen
Replies: 8
Views: 1866

Re: Is a Window Visible on Screen

I had this script kicking around on my hard drive. You could try it: Settitlematchmode, 2 Test_WinVisibleFunction: WinTitle = MyWindow ;enter you window title here ;WinHide %WinTitle% If WinVisible(WinTitle) Msgbox Visible Else Msgbox Hidden Return WinVisible(WinTitle) { WinGet, Style, Style, %WinTi...
by scriptor2016
21 Jul 2022, 00:50
Forum: Ask for Help (v1)
Topic: How to detect a click outside of the GUI?
Replies: 3
Views: 663

Re: How to detect a click outside of the GUI?

Wow I thought this would be an easy task by the sounds of it! I had a really hard time coming up with an idea. This works, but I'm not sure how efficient it is or how much sense it makes. Might be good for starters though: Gui, Show, x100 y100 w200 h200, MYGUI Return ~LButton:: Sleep, 50 WinGetTitle...
by scriptor2016
16 Jul 2022, 03:02
Forum: Ask for Help (v1)
Topic: Flagging Variable From Group
Replies: 5
Views: 903

Re: Flagging Variable From Group

ooops, nevermind - just saw Rohwedder's reply as well:

Code: Select all

Group=
(
three
six
seven
nine
)

Loop, read, C:\MyTextFile.txt
	IfInString, Group, %A_LoopReadLine% 
		msgbox, %A_LoopReadLine%


...and it works as well.

Perfect, thanks!!
by scriptor2016
16 Jul 2022, 02:58
Forum: Ask for Help (v1)
Topic: Flagging Variable From Group
Replies: 5
Views: 903

Re: Flagging Variable From Group

Hi, thanks to both of you guys. Really appreciated :) I was able to get it going like this: Loop, read, C:\MyTextFile.txt if A_LoopReadLine contains three,six,seven,nine msgbox, %A_LoopReadLine% which I suppose is much easier than creating a group. However, the Group idea still won't work (yet) no m...
by scriptor2016
16 Jul 2022, 01:15
Forum: Ask for Help (v1)
Topic: Flagging Variable From Group
Replies: 5
Views: 903

Flagging Variable From Group

I have a text file which looks like this: one two three four five six seven eight nine ten My script will read that text file line-by-line. When the text in the A_LoopReadLine reaches three,six,seven and eventually nine, it should pop up a messagebox - but only for those four numbers. However though...

Go to advanced search