Search found 16 matches

by electrone77
25 Aug 2021, 13:35
Forum: Ask for Help (v1)
Topic: Loop through lines of a variable, not a file
Replies: 3
Views: 317

Re: Loop through lines of a variable, not a file

Code: Select all

Loop, Parse, text, `n, `r
   Line := A_LoopField
by electrone77
11 Aug 2021, 16:02
Forum: Ask for Help (v1)
Topic: need help on Regexmatch to store multiple variables
Replies: 7
Views: 451

Re: need help on Regexmatch to store multiple variables

if the start of the pattern is constant: buy/sell/bot/sold maybe you can mark them with a symbol (e.g. ¢): newText := RegexReplace(yourText, "((buy)|(sell)|(bot)|(sold))", "¢$1") and then you can parse those symbols to get variables using A_LoopField: Loop, Parse, newText, ¢ { RegexMatch(A_Loopfield...
by electrone77
11 Aug 2021, 13:13
Forum: Ask for Help (v1)
Topic: Regex help
Replies: 1
Views: 208

Re: Regex help

Not sure if i get it right, but you can try this: this = ( BLAH BLAh BLAH line1: GOTO 10F john line2: GOTO 10G susan line3: GOTO 10M kath BLAH BLAH BLAH line5: GOTO 10C amanda line6: PASS line7: GOTO A8 brenda line8: PASS BLAH BLAH line9: GOTO 11D ayah line10: PASS line11: GOTO 11A danny BLAH BLAH B...
by electrone77
30 Mar 2021, 08:17
Forum: Gaming Help (v1)
Topic: #IfWinActive stops working Topic is solved
Replies: 8
Views: 801

Re: #IfWinActive stops working Topic is solved

mikeyww wrote:
29 Mar 2021, 08:32
If needed, you could have a second script that runs the game and then runs your elevated AHK script.
hm not sure if i get it right.
so 2 scripts: mainScript and secondScript.

secondScript runs:
- mainScript with admin rights
- also games etc
correct?
by electrone77
29 Mar 2021, 08:13
Forum: Gaming Help (v1)
Topic: #IfWinActive stops working Topic is solved
Replies: 8
Views: 801

Re: #IfWinActive stops working Topic is solved

i can confirm that the problem occurs, only if i run the game via autohotkey with admin rights.
but if i run the game manually, everything is OK.

note: running the game's shortcut-link first starts a launcher and then the game.
by electrone77
29 Mar 2021, 07:47
Forum: Gaming Help (v1)
Topic: #IfWinActive stops working Topic is solved
Replies: 8
Views: 801

Re: #IfWinActive stops working Topic is solved

mikeyww gregster Thanks for the quick replies. I may have found a clue. right now the script seems working, and everything OK. i'm not sure what happened but i'll try to explain. first of all, this script here, is part of a long one. Long story short, i had to Run another program via this script, b...
by electrone77
29 Mar 2021, 07:01
Forum: Gaming Help (v1)
Topic: #IfWinActive stops working Topic is solved
Replies: 8
Views: 801

#IfWinActive stops working Topic is solved

Hello everyone, Until today, this script worked perfectly. But now looks like: it works only if i run the script as admin and it works at the beginning, but after a while (maybe 30 secs or maybe 2 mins later) its not working anymore. any help appreciated. #Persistent FileEncoding, UTF-8 SetBatchLine...
by electrone77
14 Jun 2020, 07:48
Forum: Ask for Help (v1)
Topic: GuiDropFiles not working if ahk run as admin Topic is solved
Replies: 4
Views: 1526

Re: GuiDropFiles not working if ahk run as admin Topic is solved

I think there are several topics discussing this. For example, here: https://www.autohotkey.com/boards/viewtopic.php?f=14&t=4974 (haven't tested it) Thanks @gregster adding this line at the top, seems solved the problem: Loop 2 DllCall( "ChangeWindowMessageFilter", uInt, "0x" (i:=!i?49:233), uint, ...
by electrone77
14 Jun 2020, 05:08
Forum: Ask for Help (v1)
Topic: GuiDropFiles not working if ahk run as admin Topic is solved
Replies: 4
Views: 1526

GuiDropFiles not working if ahk run as admin Topic is solved

if i add below code if not A_IsAdmin { Run *RunAs "%A_ScriptFullPath%" exitapp } this line doesn't work: infoGuiDropFiles: msgbox %A_GuiEvent% return when i remove: if not A_IsAdmin { Run *RunAs "%A_ScriptFullPath%" exitapp } everything works fine! is there any solution to this? i have to run as adm...
by electrone77
22 Apr 2020, 09:33
Forum: Ask for Help (v1)
Topic: Need Help Grepping Contents From A .txt File
Replies: 5
Views: 345

Re: Need Help Grepping Contents From A .txt File

#Persistent settimer, checkNew, 1000 ;check every second RETURN checkNew: fileread, data, %A_Desktop%\log.txt ;change according to your filename and path data := RegexReplace(data, "\n") ;delete all new lines so data is like a single line. might cause a problem if line is too big tho. regexmatch(da...
by electrone77
20 Mar 2019, 09:25
Forum: Ask for Help (v1)
Topic: Replace All Text In File
Replies: 11
Views: 8343

Re: Replace All Text In File

you might wanna try it with tf.ahk, its a lib you need to download, however i am not sure how it handles the files. Heres the info download example codes (see 1st code there is "!" before File.txt. i guess it overwrites the file): TF_ReplaceInLines("!File.txt","1,3,9","","key","lock") ; update sourc...
by electrone77
18 Mar 2019, 18:23
Forum: Ask for Help (v1)
Topic: Add space after a subdomain in an url. How? Topic is solved
Replies: 15
Views: 3575

Re: Add space after a subdomain in an url. How? Topic is solved

hey, here's my 2 cents. kinda :offtopic: since question is already answered :angel: urls = ( https www.test.com / Broken Link for safety http test.co.uk /jpg.png Broken Link for safety https pbs.test.gr /xxx/xxx.jpg Broken Link for safety ) msgbox % regexreplace(urls, "m`a)(https?://(www\.|pbs\.)?.*...
by electrone77
18 Mar 2019, 16:35
Forum: Ask for Help (v1)
Topic: Find the first occurrence of text and stop
Replies: 8
Views: 2088

Re: Find the first occurrence of text and stop

in-case i might have misunderstood your question, please excuse my poor English. in addition to Blue Kodiak's post (which is awesome), here is another way to see if there are more than 1 occurrances in the text: text = your text here if regexmatch(text, "(\|\-.*?){2}") ;so {2} here is: number of occ...
by electrone77
16 Mar 2019, 17:34
Forum: Ask for Help (v1)
Topic: Find the first occurrence of text and stop
Replies: 8
Views: 2088

Re: Find the first occurrence of text and stop

yw i'm glad it worked :thumbup:
by electrone77
16 Mar 2019, 15:18
Forum: Ask for Help (v1)
Topic: Find the first occurrence of text and stop
Replies: 8
Views: 2088

Re: Find the first occurrence of text and stop

Hi, so if there's a "|-" in the text you want it to stop and perform some other action? i guess this might help. text = I have a page of text in which contains numerous "|-". How is it possible to find a single occurrence and then stop so that the macro can perform some other action? if RegExMatch(t...
by electrone77
16 Mar 2019, 13:37
Forum: Ask for Help (v1)
Topic: Replacing and storing text to clipboard Topic is solved
Replies: 10
Views: 3362

Re: Replacing and storing text to clipboard Topic is solved

Not sure if i understand it correctly, but i hope this helps. 1)if you know which word to replace: text = Clipboard is a built-in variable that reflects the current contents of the Windows clipboard ABCXYZ if those contents can be expressed as text. clipboard := regexreplace(text, "ABCXYZ", clipboar...

Go to advanced search