Search found 447 matches

by newbieforever
06 Apr 2019, 05:03
Forum: Ask For Help
Topic: How to remove A_ScriptDir after ExitApp Topic is solved
Replies: 4
Views: 723

Re: How to remove A_ScriptDir after ExitApp Topic is solved

Okay, I found out the reason: It's just a DOS issue...the directory is not removed because it is the current directory for the DOS commands. This seems to work: #Persistent F9:: Cmd = %ComSpec% /c cd .. & ping localhost -n 1 > nul & rd /s /q "%A_ScriptDir%" ; cd .. !!! Run, %Cmd%, , Hide ExitApp Ret...
by newbieforever
06 Apr 2019, 04:58
Forum: Ask For Help
Topic: How to remove A_ScriptDir after ExitApp Topic is solved
Replies: 4
Views: 723

Re: How to remove A_ScriptDir after ExitApp Topic is solved

@Kobaltauge: I think, your answer is (at least partially) incorrect. The ping command is used for a time delay so that the rd command is executed after the script is terminated. Otherwise it wouldn't be possible even to delete AutoHotkey.exe! But the demo script deletes the interpreter, so it is cle...
by newbieforever
06 Apr 2019, 03:02
Forum: Ask For Help
Topic: How to remove A_ScriptDir after ExitApp Topic is solved
Replies: 4
Views: 723

How to remove A_ScriptDir after ExitApp Topic is solved

Hi! My demo constellation: - The script directory MyDir contains the script file RemDir.ahk and the interpreter AutoHotkey.exe. - RemDir.ahk should remove the complete script directory after ExitApp. - But it deletes only the files contained in MyDir, not the directory itself. Why is this so? How to...
by newbieforever
04 Apr 2019, 03:48
Forum: Ask For Help
Topic: Output syntax errors to file
Replies: 4
Views: 763

Re: Output syntax errors to file

Okay, I get it. Just to make sure there really isn't a chance: The options are described at https://autohotkey.com/docs/commands/_ErrorStdOut.htm. But in my constellation I can't use this DOS command line options. My goal would be that no error dialog should be displayed, but that the error message ...
by newbieforever
03 Apr 2019, 09:02
Forum: Ask For Help
Topic: Output syntax errors to file
Replies: 4
Views: 763

Re: Output syntax errors to file

@swagfag:

Sorry, I mean a Windows desktop shortcut (lnk file).
by newbieforever
03 Apr 2019, 08:01
Forum: Ask For Help
Topic: Output syntax errors to file
Replies: 4
Views: 763

Output syntax errors to file

Hi!

This works from the DOS console:

AutoHotkey.exe /ErrorStdOut "MyScript.ahk" 2>"ErrorLog.txt"

Is it possible to achieve the same by a Windows link?

EDIT: Sorry, I mean a Windows desktop shortcut (lnk file).
by newbieforever
02 Apr 2019, 04:00
Forum: Ask For Help
Topic: How to manage the FileGetTime & DST problem?
Replies: 3
Views: 616

Re: How to manage the FileGetTime & DST problem?

???

Is there another way to get the timestamp of a file (to avoid the use of FileGetTime)?
by newbieforever
01 Apr 2019, 11:58
Forum: Ask For Help
Topic: How to manage the FileGetTime & DST problem?
Replies: 3
Views: 616

Re: How to manage the FileGetTime & DST problem?

Thank you, sinkfaze! Europe/Berlin/Vienna. In our region DST is this year from March 31 to October 27. Windows 10. ...Windows Explorer displays (e.g.) 14:21, file properties says 14:21, but FileGetTime gives 15:21... Why the hell FileGetTime behaves this way? ("Why" not in the sense "how does it com...
by newbieforever
01 Apr 2019, 08:54
Forum: Ask For Help
Topic: How to manage the FileGetTime & DST problem?
Replies: 3
Views: 616

How to manage the FileGetTime & DST problem?

Hi! It's so stupid! Since yesterday one of my important tools doesn't work anymore. The reason: Yesterday we switched to daylight saving time. In the script the timestamp of files is determined and compared with timestamps stored in a file. The problem: For one file the timestamp 20190305142100 is s...
by newbieforever
30 Mar 2019, 14:57
Forum: Ask For Help
Topic: Is there a way to capture the syntax error dialog?
Replies: 1
Views: 386

Is there a way to capture the syntax error dialog?

Hi! A script should be run via AutoHotkey.exe MyScript.ahk If there is a syntax error in the script, an dialog is displayed. Is there a way to capture such error messages? Should this be possible, the script could provide a routine doing appropriate actions in the case a syntax error is detected, e....
by newbieforever
30 Mar 2019, 07:18
Forum: Ask For Help
Topic: No IfIn for a simple array?
Replies: 21
Views: 2180

Re: No IfIn for a simple array?

Direct = without a loop.
by newbieforever
30 Mar 2019, 07:02
Forum: Ask For Help
Topic: No IfIn for a simple array?
Replies: 21
Views: 2180

Re: No IfIn for a simple array?

@Tigerlily: But of course this was meant to mean that you don't know in advance that it is the 2nd element.
Or, for a better understanding of my question:


array := ["one", "three", "two"]

Is there really no direct way to check if "four" is an element of the array (so that a loop must be used)?
by newbieforever
30 Mar 2019, 06:30
Forum: Ask For Help
Topic: No IfIn for a simple array?
Replies: 21
Views: 2180

Re: No IfIn for a simple array?

Thank you, Kobaltaugte & Tigerlily!

So I summarize: There is no "direct way" (in the sense of my question)...
by newbieforever
30 Mar 2019, 05:42
Forum: Ask For Help
Topic: No IfIn for a simple array?
Replies: 21
Views: 2180

No IfIn for a simple array?

Hi!

array := ["one", "two", "three"]

Is there really no direct way to check if "two" is an element of the array (so that a loop must be used)?
by newbieforever
28 Mar 2019, 04:26
Forum: Ask For Help
Topic: An IF question Topic is solved
Replies: 2
Views: 370

Re: An IF question Topic is solved

Thank you, gregster!!!
by newbieforever
28 Mar 2019, 04:10
Forum: Ask For Help
Topic: An IF question Topic is solved
Replies: 2
Views: 370

An IF question Topic is solved

Hi!

Code: Select all

If Var1 && Var2
; or: 
; If (x > 0) && (y > 0)
Are such lines processed in such a way that Var2 is not checked if Var1 is false?

Code: Select all

If Var1
  If Var2
by newbieforever
21 Mar 2019, 14:17
Forum: Ask For Help
Topic: Can this error message be captured?
Replies: 9
Views: 1262

Re: Can this error message be captured?

@Tigerlily:
In the "normal way" means: without Try. (Please don't ask why that makes sense. It has to do with that: The solution for the case that the script file has been deleted should be provided in an included library, but no adjustments should be necessary in the main script for this case.)
by newbieforever
21 Mar 2019, 11:53
Forum: Ask For Help
Topic: Can this error message be captured?
Replies: 9
Views: 1262

Re: Can this error message be captured?

Thx wolf_II & Tigerlily!!! Yes, this OnMessage method works fine if Reload is initiated via tray menu. Would it be possible to intercept in a similar way the error message which is displayed if Reload is initiated by the script command (e.g. by a hotkey which uses the Reload command)? (I know from t...
by newbieforever
20 Mar 2019, 14:11
Forum: Ask For Help
Topic: Can this error message be captured?
Replies: 9
Views: 1262

Re: Can this error message be captured?

@Tigerlily:
Perhaps I overlook or misunderstand something, but I do not see what solution is contained in these tips...
by newbieforever
20 Mar 2019, 12:34
Forum: Ask For Help
Topic: Can this error message be captured?
Replies: 9
Views: 1262

Re: Can this error message be captured?

Oh! Thank you, Scr1pter!
Is there a solution which would work if Reload is initiated via tray icon?

Go to advanced search