Search found 104 matches

by joshatt
12 May 2020, 01:21
Forum: Ask For Help
Topic: give WaitForResponse() a time limit? Topic is solved
Replies: 5
Views: 252

Re: give WaitForResponse() a time limit? Topic is solved

boiler wrote:
12 May 2020, 01:06
It looks like you are getting the error from WaitForResponse, but the good thing is you don’t have to decide. You can put all of them inside the Try { }, and whatever causes an error will trigger the Catch.
OK, thanks a lot, appreciate it.
by joshatt
12 May 2020, 00:58
Forum: Ask For Help
Topic: give WaitForResponse() a time limit? Topic is solved
Replies: 5
Views: 252

Re: give WaitForResponse() a time limit? Topic is solved

boiler wrote:
11 May 2020, 21:31
How about just letting it reach the point where it gives the error but use Try/Catch to handle whether it errors out or not?
create,open,send,waitfor......which must be included in Try{}, in this case ?
by joshatt
12 May 2020, 00:14
Forum: Ask For Help
Topic: give WaitForResponse() a time limit? Topic is solved
Replies: 5
Views: 252

Re: give WaitForResponse() a time limit? Topic is solved

How about just letting it reach the point where it gives the error but use Try/Catch to handle whether it errors out or not?
Terrific! Never learned this.
by joshatt
11 May 2020, 21:14
Forum: Ask For Help
Topic: give WaitForResponse() a time limit? Topic is solved
Replies: 5
Views: 252

give WaitForResponse() a time limit? Topic is solved

Hi all, Here's a code from documentation: whr := ComObjCreate("WinHttp.WinHttpRequest.5.1") whr.Open("GET", "https://random.random2.com/", true) whr.Send() ; Using 'true' above and the call below allows the script to remain responsive. whr.WaitForResponse() version := whr.ResponseText MsgBox % versi...
by joshatt
30 Mar 2020, 22:25
Forum: Ask For Help
Topic: Regex in multi lines text? Topic is solved
Replies: 4
Views: 239

Re: Regex in multi lines text? Topic is solved

teadrinker wrote:
30 Mar 2020, 22:18

Code: Select all

alltext := "adfdsff`r`n"
         . "efresfsdf`r`n"
         . "AAA:randomwords`r`n"
         . "EFDFDF"
out:=RegExReplace(alltext,"s).*\RAAA:(.*?)\R.*","$1")
MsgBox,% "|" . out . "|"
Thanks! That works great.
by joshatt
30 Mar 2020, 22:17
Forum: Ask For Help
Topic: Regex in multi lines text? Topic is solved
Replies: 4
Views: 239

Re: Regex in multi lines text? Topic is solved

Try \v instead of \n to match any vertical whitespace character. WOW, vertical whitespace? new one for me. It works great! My real-world example is more complicated, I don't know why it HAS TO be like this, but the following changing works: out:= RegExReplace(alltext,"s).*Avid:(.*?)\v.*","$1") s) i...
by joshatt
30 Mar 2020, 20:43
Forum: Ask For Help
Topic: Regex in multi lines text? Topic is solved
Replies: 4
Views: 239

Regex in multi lines text? Topic is solved

Hi all, alltext= ( adfdsff efresfsdf AAA:randomwords EFDFDF ) out:=RegExReplace(alltext,"m).*\nAAA:(.*)\n.*","$1") MsgBox,% out For testing purpose, I keyboarded the above multi lines paragraph, and the two "\n" works(but "\r" won't). My goal is to get "randomwords", without any other words. But the...
by joshatt
18 Mar 2020, 19:32
Forum: Ask For Help
Topic: run inetcpl.cpl with parameter ",4"? Topic is solved
Replies: 4
Views: 442

Re: run inetcpl.cpl with parameter ",4"? Topic is solved

Alguimist Thank you so much. Based on yours I got what I wanted - LAN Settings: Run % "rundll32 Shell32.dll,Control_RunDLL inetcpl.cpl,,4",,, PID WinWaitActive ahk_pid %PID% send,!l Maybe you want to access a specific dialog from that tab page. For example (untested): DllCall("connect.dll\CreateVPN...
by joshatt
18 Mar 2020, 19:24
Forum: Ask For Help
Topic: run inetcpl.cpl with parameter ",4"? Topic is solved
Replies: 4
Views: 442

Re: run inetcpl.cpl with parameter ",4"? Topic is solved

HotKeyIt wrote:
17 Mar 2020, 22:50

Code: Select all

Run % "control inetcpl.cpl,,4"
Thanks a lot for your help, it works!
by joshatt
17 Mar 2020, 20:10
Forum: Ask For Help
Topic: run inetcpl.cpl with parameter ",4"? Topic is solved
Replies: 4
Views: 442

run inetcpl.cpl with parameter ",4"? Topic is solved

Hi all,
Could anybody please tell me how to Run "inetcpl.cpl,4"?
by joshatt
02 Mar 2020, 23:39
Forum: Ask For Help
Topic: watch a folder ONLY for file renaming Topic is solved
Replies: 8
Views: 391

Re: watch a folder ONLY for file renaming Topic is solved

Thanks guys. I'll keep those powerful and complicated for later study. My try based on @vsub's enlightenment: #Persistent Loop { Sleep,1000 If FileExist("H:\*.fdmdownload") { laststatus := 1 Continue } If ( !FileExist("H:\*.fdmdownload") and laststatus=1 ) { ;SoundPlay,C:\Windows\media\Windows Logon...
by joshatt
02 Mar 2020, 09:02
Forum: Ask For Help
Topic: watch a folder ONLY for file renaming Topic is solved
Replies: 8
Views: 391

Re: watch a folder ONLY for file renaming Topic is solved

Thank you, sir. That's neat and simple. Although I sometimes have more than one download task simutaneously, I just need an alert when all of them done. So, great tip!
by joshatt
02 Mar 2020, 07:58
Forum: Ask For Help
Topic: watch a folder ONLY for file renaming Topic is solved
Replies: 8
Views: 391

watch a folder ONLY for file renaming Topic is solved

Hi all, I'm planning to essemble a script to get "play a sound when any download finished", that is: monitor files extension changing in a folder - this folder is a download target folder (both as temporary file and target folder), when a download begins, a new temp file, say ABC.ZIP.FDMDOWNLOAD wil...
by joshatt
09 Apr 2019, 23:46
Forum: AHK Studio
Topic: AHK Studio
Replies: 1090
Views: 378722

Re: AHK Studio

No problem. You can also use DebugWindow() for whatever you need it for like debugging or to put up random messages of encouragement (if you get bored)
Roger that.
by joshatt
09 Apr 2019, 18:53
Forum: AHK Studio
Topic: AHK Studio
Replies: 1090
Views: 378722

Re: AHK Studio

maestrith wrote:
09 Apr 2019, 18:39
You can also just Select All of the text and hit Delete.
Thanks a lot. That's all very helpful.
by joshatt
09 Apr 2019, 18:31
Forum: AHK Studio
Topic: AHK Studio
Replies: 1090
Views: 378722

Re: AHK Studio

One question about interface please: how do I clear content of Debug Window? Sometimes I want to clear it but instead make that window disappear and don't know how to get it back, although I did randomly get it back later, lol.
by joshatt
11 Mar 2019, 20:01
Forum: AHK Studio
Topic: AHK Studio
Replies: 1090
Views: 378722

Re: AHK Studio

Hi, after a script wrote/appended to itself, I need it refreshed in Studio, is there a function to refresh? Accidentally I find "ALT+T" (test plugin) could do so, but I don't know if it will affect other things. Alt+M Refresh Code/Project Explorer then choose Current Project. Thanks for your help!
by joshatt
11 Mar 2019, 17:31
Forum: AHK Studio
Topic: AHK Studio
Replies: 1090
Views: 378722

Re: AHK Studio

Hi, after a script wrote/appended to itself, I need it refreshed in Studio, is there a function to refresh? Accidentally I find "ALT+T" (test plugin) could do so, but I don't know if it will affect other things.
by joshatt
19 Feb 2019, 01:02
Forum: Ask For Help
Topic: regex question Topic is solved
Replies: 6
Views: 1113

Re: regex question Topic is solved

I am guessing this is what you're looking for variable = abcd-567 ; or 12abcd-567 if RegExMatch(variable,"((?:\d|\w)+)-(\d+)",vars) msgbox,% vars1 . "_" . vars2 ; or if RegExMatch(variable,"((\d|\w)+)-(\d+)",vars) msgbox,% vars1 . "_" . vars3 ; or variable = 12abcd-567 if RegExMatch(variable,"(\w+)...
by joshatt
18 Feb 2019, 23:24
Forum: Ask For Help
Topic: regex question Topic is solved
Replies: 6
Views: 1113

Re: regex question Topic is solved

I am no Regex expert, but I think it would be nice if you would at least mention, what you expect as a result... https://www.autohotkey.com/boards/posting.php?mode=quote&f=76&p=264188#postingbox Sorry my bad, did not make it clear. I want to match the 2 or 3 possabilites (former part could be inter...

Go to advanced search