Script file not found autohotkey что делать

Script file not found autohotkey что делать

I’m messing with a code that is called upon first time use of my script.
The problem specifically, is using file move on a running script.
After moving the running script followed by reloading it, I get a «Script File Not Found» error, due to the scripts directory being changed.

There is no documentation, or posts I’ve seen related to this issue, and I can not figure out a way to prevent this error/change to the new directory.

I thought SetWorkingDir was what I needed, but it does nothing?
Any help would be great, If needed I will post the related code.

Hey, thanks for the suggestion. That was actually one of the first things I tried yesterday, and it had bad results/was not reliable/loaded very slow often.

That seems like a bit of a cheap trick though anyways, if you know what I mean.
I’d like to do it properly if there is a better way. It seems like it should be a very basic thing, yet I can’t find any information about it.

Any other suggestions would be great, thanks.

Edit: I got it working properly now with that method. Just had to fix other conflicting code I had which was causing issues.
I’d still like to know if there is a more proper way to do this though. =d

I’m honestly surprised if that’s the only way, it seems like such a basic thing that ahk should be able to do. =/
Oh by the way, it does work fine performance wise now, I just had some other related code causing issues.
I appreciate you trying to help by the way!

I’ll show the related code, but it won’t really help to find a better solution in this situation. =/

Hey Punchin.
Thanks, I’ll look into this and post back after. It sounds like it’s what I’m looking for. I’ll try mess around a bit.

Edit: Now that I think of it.. This actually sounds more technical then running the new instance, followed by exiting the old instance.
My question- So it’s not possible to change the running scripts directory after FileMove, without reloading?
There’s no way to change the variable A_ScriptDir or use SetWorkingDir to do the above^?

Looks like I didn’t explain myself well enough. It’s slightly more technical of an issue than what you’re thinking.
I’m starting to think it’s probably not possible to do what I want. I edited my last post, but basically this is the question/issue.

So it’s not possible to change the running scripts directory after FileMove, without reloading?
There’s no way to change the variable A_ScriptDir or use SetWorkingDir to do the above^?

If the above is not possible, I guess I’ll have to stick with the easiest way.

What I ask is to simplify the problem, because we don’t have to overview over the complete ahk script(s). So for me it is not clear why SetWorkingDir is not working on your installation.

What I ask is to simplify the problem, because we don’t have to overview over the complete ahk script(s). So for me it is not clear why SetWorkingDir is not working on your installation.

Ok, SetWorkingDir does seem to work, but not exactly, or at least not how I thought it would.
This is the problem.

-I Move the file (running ahk script) to a specific folder with FileMove.
-I use SetWorkingDir to change the running scripts directory.
-I Reload the script, which then causes the error «Script File Not Found».
(Moving the running script to a different location causes the issue, and I thought using SetWorkingDir would solved the problem.)
Basically it tries to reload A_ScriptDir but the file has been moved/directory has changed, so A_ScriptDir is now invalid, and reload fails.
So the problem is I cannot change the A_ScriptDir variable to the new directory, and get passed the script file error.

I hope that better explains what I mean.

When using Script-Parameters call it with
run %A_AhkPath% «EO+ OFFICIAL.ahk» «skip», %EODir%
And check with

Hope this is a solution for you.

FoxHunter: Thanks for trying to help, I already understood all that though, and that’s not what I’m looking to do.

If Reload will fail no matter what after moving the running script (changing directory) that’s all I need to know.
If that’s the case, I’ll just run the new script followed by exiting the old, like I mentioned before.

I don’t understand why Reload fails though, I’d think you should be able to change the script directory, followed by reloading.
I’m pretty confused as to how it’s not possible to change the scripts A_ScriptDir variable. I thought SetWorkingDir was for this purpose, no?

What is the difference between A_ScriptDir and SetWorkingDir? Why can’t A_ScriptDir be changed/updated?
I understand that A_Script is a variable containing the running scripts directory.. Why doesn’t SetWorkingDir or anything else effect this?
Seems like a limitation in ahk that should not exist if that’s the case. =/

Logically, it should be very possible to change a running scripts directory to bypass this error from a running file being moved, and allow a reload. =/
Anyways, to clarify, if there is no way to move a running file, and update it’s directory to bypass a file error, and allow a reload, then that’s all I need to know.
Obviously there is nothing more I can do in that situation. =/

Punchin: I assign the OutputVar to another variable immediately, because I will be using that variable throughout the script. I’ll also be using multiple outputvar checks, so putting the OutputVar into a new variable for global use is required for me.

Edit: Sorry in advance if I don’t respond until late. I have work and other things to do today, so I may not reply back until very late tonight or tomorrow.
Appreciate all the attempts at helping, thanks!

Источник

AHK utilman script gives file not found error

I’m trying to create a simple backdoor for myself through utilman on my computer using autohotkey. Basically I want to have the ease of access button function normally in all cases on login screen Except when I hold down the M key, where in this case it opens cmd instead. No batch or cmd window should pop up, and one doesn’t. The issue I’m having is that I get a file not found error from the script, I compiled the script into Utilman.exe and tested with a copy of the real utilman (renamed to lol.exe which is specified in the script to run normally) and this works fine in its own directory. However when I do this in the system32 folder it gives an error that lol.exe is not found, also executing lol.exe on it’s own gives the exact same error, as if it reroutes to the script named Utilman yet again. Here is the script, should be short and simple:

Thanks for any pointers, alternative suggestions or ideas. This would be great to get working.

EDIT: Changing Run lol.exe to Run, «C:\Windows\System32\lol.exe» now gives instead an exe corrupted error. This also happens if I run lol.exe on it’s own, I’m really not sure what’s happening.

EDIT2: Running the script from a different location again gives the file not found error, rather than the exe corrupted error.

This works perfectly everywhere EXCEPT the system32 folder, where it gives the exe corrupted error even when run with elevated permissions, this is frustrating.

1 Answer 1

1) Compile your script anywhere you want. I suggest using the following code as a basis:

2) In the registry, go to:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options

Your replacement will now run whenever an executable called utilman.exe is started.

4) Click the ease of access button. CMD will open when you hold down M before you click as well as when you press it just after the click. Modify the Sleep in the script above to rule how long to wait for the key press.

Update:

Both work while logged in, but none of them work while the screen is locked, triggering the server start error. Unfortunately, I’m at my wit’s end here. Maybe someone else has an idea.

Источник

Script file not found autohotkey что делать. 95b342471d6fa87fa386832f9e031e8d?s=100&d=%2F%2Fwww.autohotkey.com%2Fboard%2Fpublic%2Fstyle images%2Fortem%2Fprofile%2Fdefault large. Script file not found autohotkey что делать фото. Script file not found autohotkey что делать-95b342471d6fa87fa386832f9e031e8d?s=100&d=%2F%2Fwww.autohotkey.com%2Fboard%2Fpublic%2Fstyle images%2Fortem%2Fprofile%2Fdefault large. картинка Script file not found autohotkey что делать. картинка 95b342471d6fa87fa386832f9e031e8d?s=100&d=%2F%2Fwww.autohotkey.com%2Fboard%2Fpublic%2Fstyle images%2Fortem%2Fprofile%2Fdefault large

shift+c:: will not be active because it does not exist in the current layout

Then it says: Error invalid key or button name, specifically: shift+c, then shows some lines of code and says at botton «The program will exit»

Script file not found autohotkey что делать. photo thumb 2381. Script file not found autohotkey что делать фото. Script file not found autohotkey что делать-photo thumb 2381. картинка Script file not found autohotkey что делать. картинка photo thumb 2381

Script file not found autohotkey что делать. 95b342471d6fa87fa386832f9e031e8d?s=100&d=%2F%2Fwww.autohotkey.com%2Fboard%2Fpublic%2Fstyle images%2Fortem%2Fprofile%2Fdefault large. Script file not found autohotkey что делать фото. Script file not found autohotkey что делать-95b342471d6fa87fa386832f9e031e8d?s=100&d=%2F%2Fwww.autohotkey.com%2Fboard%2Fpublic%2Fstyle images%2Fortem%2Fprofile%2Fdefault large. картинка Script file not found autohotkey что делать. картинка 95b342471d6fa87fa386832f9e031e8d?s=100&d=%2F%2Fwww.autohotkey.com%2Fboard%2Fpublic%2Fstyle images%2Fortem%2Fprofile%2Fdefault large

Quick start tutorial

To create a new script:

Save and close the file.
In Windows Explorer, double-click the script to launch it. A new tray icon appears.
Hold down the Windows key and press the spacebar. A web page opens in the default browser.
To exit or edit the script, right click its tray icon.

Script file not found autohotkey что делать. 411d94e6984dd6cf6d78bbb946abdd5c?s=100&d=%2F%2Fwww.autohotkey.com%2Fboard%2Fpublic%2Fstyle images%2Fortem%2Fprofile%2Fdefault large. Script file not found autohotkey что делать фото. Script file not found autohotkey что делать-411d94e6984dd6cf6d78bbb946abdd5c?s=100&d=%2F%2Fwww.autohotkey.com%2Fboard%2Fpublic%2Fstyle images%2Fortem%2Fprofile%2Fdefault large. картинка Script file not found autohotkey что делать. картинка 411d94e6984dd6cf6d78bbb946abdd5c?s=100&d=%2F%2Fwww.autohotkey.com%2Fboard%2Fpublic%2Fstyle images%2Fortem%2Fprofile%2Fdefault large

Script file not found autohotkey что делать. d41d8cd98f00b204e9800998ecf8427e?s=100&d=%2F%2Fwww.autohotkey.com%2Fboard%2Fpublic%2Fstyle images%2Fortem%2Fprofile%2Fdefault large. Script file not found autohotkey что делать фото. Script file not found autohotkey что делать-d41d8cd98f00b204e9800998ecf8427e?s=100&d=%2F%2Fwww.autohotkey.com%2Fboard%2Fpublic%2Fstyle images%2Fortem%2Fprofile%2Fdefault large. картинка Script file not found autohotkey что делать. картинка d41d8cd98f00b204e9800998ecf8427e?s=100&d=%2F%2Fwww.autohotkey.com%2Fboard%2Fpublic%2Fstyle images%2Fortem%2Fprofile%2Fdefault large

im talking about eddting the script that autoloads when i start AutoHotKey.

Script file not found autohotkey что делать. db8ab12f7d9272a2331eda4f34b97a3d?s=100&d=%2F%2Fwww.autohotkey.com%2Fboard%2Fpublic%2Fstyle images%2Fortem%2Fprofile%2Fdefault large. Script file not found autohotkey что делать фото. Script file not found autohotkey что делать-db8ab12f7d9272a2331eda4f34b97a3d?s=100&d=%2F%2Fwww.autohotkey.com%2Fboard%2Fpublic%2Fstyle images%2Fortem%2Fprofile%2Fdefault large. картинка Script file not found autohotkey что делать. картинка db8ab12f7d9272a2331eda4f34b97a3d?s=100&d=%2F%2Fwww.autohotkey.com%2Fboard%2Fpublic%2Fstyle images%2Fortem%2Fprofile%2Fdefault large

Guys. None of you are answering his question:

Script file not found autohotkey что делать. d41d8cd98f00b204e9800998ecf8427e?s=100&d=%2F%2Fwww.autohotkey.com%2Fboard%2Fpublic%2Fstyle images%2Fortem%2Fprofile%2Fdefault large. Script file not found autohotkey что делать фото. Script file not found autohotkey что делать-d41d8cd98f00b204e9800998ecf8427e?s=100&d=%2F%2Fwww.autohotkey.com%2Fboard%2Fpublic%2Fstyle images%2Fortem%2Fprofile%2Fdefault large. картинка Script file not found autohotkey что делать. картинка d41d8cd98f00b204e9800998ecf8427e?s=100&d=%2F%2Fwww.autohotkey.com%2Fboard%2Fpublic%2Fstyle images%2Fortem%2Fprofile%2Fdefault large

Guys. None of you are answering his question:

yes I did. he has been running AutoHotkey from the Start Menu. so he doesn’t know where the default script is to edit it. my Solution link mentions Notepad. to REALLY drive it home.
To Edit the Default AutoHotkey Script.

Script file not found autohotkey что делать. photo 873. Script file not found autohotkey что делать фото. Script file not found autohotkey что делать-photo 873. картинка Script file not found autohotkey что делать. картинка photo 873

Script file not found autohotkey что делать. db8ab12f7d9272a2331eda4f34b97a3d?s=100&d=%2F%2Fwww.autohotkey.com%2Fboard%2Fpublic%2Fstyle images%2Fortem%2Fprofile%2Fdefault large. Script file not found autohotkey что делать фото. Script file not found autohotkey что делать-db8ab12f7d9272a2331eda4f34b97a3d?s=100&d=%2F%2Fwww.autohotkey.com%2Fboard%2Fpublic%2Fstyle images%2Fortem%2Fprofile%2Fdefault large. картинка Script file not found autohotkey что делать. картинка db8ab12f7d9272a2331eda4f34b97a3d?s=100&d=%2F%2Fwww.autohotkey.com%2Fboard%2Fpublic%2Fstyle images%2Fortem%2Fprofile%2Fdefault large

Guys. None of you are answering his question:

yes I did. he has been running AutoHotkey from the Start Menu. so he doesn’t know where the default script is to edit it. my Solution link mentions Notepad. to REALLY drive it home.
[list] To Edit the Default AutoHotkey Script.

Script file not found autohotkey что делать. d41d8cd98f00b204e9800998ecf8427e?s=100&d=%2F%2Fwww.autohotkey.com%2Fboard%2Fpublic%2Fstyle images%2Fortem%2Fprofile%2Fdefault large. Script file not found autohotkey что делать фото. Script file not found autohotkey что делать-d41d8cd98f00b204e9800998ecf8427e?s=100&d=%2F%2Fwww.autohotkey.com%2Fboard%2Fpublic%2Fstyle images%2Fortem%2Fprofile%2Fdefault large. картинка Script file not found autohotkey что делать. картинка d41d8cd98f00b204e9800998ecf8427e?s=100&d=%2F%2Fwww.autohotkey.com%2Fboard%2Fpublic%2Fstyle images%2Fortem%2Fprofile%2Fdefault large

JS, can I lift the list of links you posted and put it in my help thread? It’s well collected.

yes but only if they remain purple linked. hehehe. I love the look of my purple links. (you can click quote to be able to copy the list already purple linked, just remove the excess & copy/paste to your thread). you could also add both help descriptions from the Solution link & the new steps I posted here (above) & now here, in this post.

Windows explorer? i have an internet explorer.

Those instructions on the tutorial should just say My Computer (not Windows Explorer) or something else (like My Documents). & it should tell you how to get there, like I do.
To create a new AutoHotkey (.ahk) Script.

Источник

Script not working ingame

Script file not found autohotkey что делать. 9b5c1ab0ebccb118aab6b203aaca1435?s=100&d=%2F%2Fwww.autohotkey.com%2Fboard%2Fpublic%2Fstyle images%2Fortem%2Fprofile%2Fdefault large. Script file not found autohotkey что делать фото. Script file not found autohotkey что делать-9b5c1ab0ebccb118aab6b203aaca1435?s=100&d=%2F%2Fwww.autohotkey.com%2Fboard%2Fpublic%2Fstyle images%2Fortem%2Fprofile%2Fdefault large. картинка Script file not found autohotkey что делать. картинка 9b5c1ab0ebccb118aab6b203aaca1435?s=100&d=%2F%2Fwww.autohotkey.com%2Fboard%2Fpublic%2Fstyle images%2Fortem%2Fprofile%2Fdefault large

Script file not found autohotkey что делать. photo 873. Script file not found autohotkey что делать фото. Script file not found autohotkey что делать-photo 873. картинка Script file not found autohotkey что делать. картинка photo 873

Script file not found autohotkey что делать. 9b5c1ab0ebccb118aab6b203aaca1435?s=100&d=%2F%2Fwww.autohotkey.com%2Fboard%2Fpublic%2Fstyle images%2Fortem%2Fprofile%2Fdefault large. Script file not found autohotkey что делать фото. Script file not found autohotkey что делать-9b5c1ab0ebccb118aab6b203aaca1435?s=100&d=%2F%2Fwww.autohotkey.com%2Fboard%2Fpublic%2Fstyle images%2Fortem%2Fprofile%2Fdefault large. картинка Script file not found autohotkey что делать. картинка 9b5c1ab0ebccb118aab6b203aaca1435?s=100&d=%2F%2Fwww.autohotkey.com%2Fboard%2Fpublic%2Fstyle images%2Fortem%2Fprofile%2Fdefault large

Script file not found autohotkey что делать. photo 873. Script file not found autohotkey что делать фото. Script file not found autohotkey что делать-photo 873. картинка Script file not found autohotkey что делать. картинка photo 873

Script file not found autohotkey что делать. 9b5c1ab0ebccb118aab6b203aaca1435?s=100&d=%2F%2Fwww.autohotkey.com%2Fboard%2Fpublic%2Fstyle images%2Fortem%2Fprofile%2Fdefault large. Script file not found autohotkey что делать фото. Script file not found autohotkey что делать-9b5c1ab0ebccb118aab6b203aaca1435?s=100&d=%2F%2Fwww.autohotkey.com%2Fboard%2Fpublic%2Fstyle images%2Fortem%2Fprofile%2Fdefault large. картинка Script file not found autohotkey что делать. картинка 9b5c1ab0ebccb118aab6b203aaca1435?s=100&d=%2F%2Fwww.autohotkey.com%2Fboard%2Fpublic%2Fstyle images%2Fortem%2Fprofile%2Fdefault large

Script file not found autohotkey что делать. photo 873. Script file not found autohotkey что делать фото. Script file not found autohotkey что делать-photo 873. картинка Script file not found autohotkey что делать. картинка photo 873

If the current user has admin rights, this variable contains 1. Otherwise, it contains 0. Under Windows 95/98/Me, this variable always contains 1.

On Windows Vista or later, some scripts might require administrator privileges to function properly (such as a script that interacts with a process or window that is run as administrator). To achieve this, add the following at the top of the script:

See link in original quote

Just put this script to your Standard Library and put this function at the top of the script, as simple as that.

Источник

Frequently Asked Questions (FAQ)

Table of Contents

Language Syntax

When are quotation marks used with commands and their parameters?

When exactly are variable names enclosed in percent signs?

Variable names are always enclosed in percent signs except in cases illustrated in bold below:

For further explanation of how percent signs are used, see Legacy Syntax and Dynamic Variables. Percent signs can also have other meanings:

When should percent signs and commas be escaped?

Literal percent signs must be escaped by preceding them with an accent/backtick. For example: MsgBox The current percentage is 25`%. Literal commas must also be escaped ( `, ) except when used in MsgBox or the last parameter of any command (in which case the accent is permitted but not necessary).

General Troubleshooting

What can I do if AutoHotkey won’t install?

7-zip Error: Use 7-zip or a compatible program to extract the setup files from the installer EXE, then run setup.exe or Installer.ahk (drag and drop Installer.ahk onto AutoHotkeyU32.exe).

AutoHotkey’s installer comes packaged as a 7-zip self-extracting archive which attempts to extract to the user’s Temp directory and execute a compiled script. Sometimes system policies or other factors prevent the files from being extracted or executed. Usually in such cases the message «7-zip Error» is displayed. Manually extracting the files to a different directory may help.

Setup hangs: If the setup window comes up blank or not at all, try one or both of the following:

Other: The suggestions above cover the most common problems. For further assistance, post on the forums.

Normally if AutoHotkey is installed, right-clicking an AutoHotkey script (.ahk) file should give the following options:

This can be done by applying this registry patch.

It may also be necessary to repair the default registry values, either by reinstalling AutoHotkey or by running AutoHotkey Setup (from the Start menu) and selecting apply near the top of the window.

Why do some lines in my script never execute?

Any lines you want to execute immediately when the script starts should appear at the top of the script, prior to the first hotkey, hotstring, or Return. For details, see auto-execute section.

Also, a hotkey that executes more than one line must list its first line beneath the hotkey, not on the same line. For example:

Why doesn’t my script work on Windows xxx even though it worked on a previous version?

There are many variations of this problem, such as:

If you’ve switched operating systems, it is likely that something else has also changed and may be affecting your script. For instance, if you’ve got a new computer, it might have different drivers or other software installed. If you’ve also updated to a newer version of AutoHotkey, find out which version you had before and then check the changelog and compatibility notes.

SoundGet, SoundSet, SoundGetWaveVolume and SoundSetWaveVolume behave differently on Vista and later than on earlier versions of Windows. In particular, device numbers are different and some components may be unavailable. Behaviour depends on the audio drivers, which are necessarily different to the ones used on XP. The soundcard analysis script can be used to find the correct device numbers.

Also refer to the following question:

How do I work around problems caused by User Account Control (UAC)?

User Account Control (UAC) is a common cause of problems, especially when moving from Windows XP/Vista/7 to Vista/7/8/10. Although it is present in Windows Vista and later, it is enabled by default on new systems or new installs, and it is more difficult to disable on Windows 8 and later.

By default, UAC protects «elevated» programs (that is, programs which are running as admin) from being automated by non-elevated programs, since that would allow them to bypass security restrictions. Hotkeys are also blocked, so for instance, a non-elevated program cannot spy on input intended for an elevated program.

UAC may also prevent SendPlay and BlockInput from working.

Common workarounds are as follows:

I can’t edit my script via tray icon because it won’t start due to an error. What do I do?

You need to fix the error in your script before you can get your tray icon back. But first, you need to find the script file.

Look for AutoHotkey.ahk in the following directories:

If you are running another AutoHotkey executable directly, the name of the script depends on the executable. For example, if you are running AutoHotkeyU32.exe, look for AutoHotkeyU32.ahk. Note that depending on your system settings the «.ahk» part may be hidden, but the file should have an icon like Script file not found autohotkey что делать. ahkfile16. Script file not found autohotkey что делать фото. Script file not found autohotkey что делать-ahkfile16. картинка Script file not found autohotkey что делать. картинка ahkfile16

You can usually edit a script file by right clicking it and selecting Edit Script. If that doesn’t work, you can open the file in Notepad or another editor.

If you launch AutoHotkey from the Start menu or by running AutoHotkey.exe directly (without command line parameters), it will look for a script in one of the locations shown above. Alternatively, you can create a script file (something.ahk) anywhere you like, and run the script file instead of running AutoHotkey.

How can I find and fix errors in my code?

For simple scripts, see Debugging a Script. To show contents of a variable, use MsgBox or ToolTip. For complex scripts, see Interactive Debugging.

Why is the Run command unable to launch my game or program?

Some programs need to be started in their own directories (when in doubt, it is usually best to do so). For example:

If the program you are trying to start is in %A_WinDir%\System32 and you are using AutoHotkey 32-bit on a 64-bit system, the File System Redirector may be interfering. To work around this, use %A_WinDir%\SysNative instead; this is a virtual directory only visible to 32-bit programs running on 64-bit systems.

Why are the non-ASCII characters in my script displaying or sending incorrectly?

Short answer: Save the script as UTF-8 with BOM.

Although AutoHotkey supports Unicode text, it is optimized for backward-compatibility, which means defaulting to the ANSI encoding rather than the more internationally recommended UTF-8. AutoHotkey will not automatically recognize a UTF-8 file unless it begins with a byte order mark.

In other words, UTF-8 files which lack a byte order mark are misinterpreted, causing non-ASCII characters to be decoded incorrectly. To resolve this, save the file as UTF-8 with BOM or add the /CP65001 command line switch.

To save as UTF-8 with BOM in Notepad, select UTF-8 from the Encoding drop-down in the Save As dialog.

Note that INI files accessed with the standard INI commands do not support UTF-8; they must be saved as ANSI or UTF-16.

Why do Hotstrings, Send, and Click have no effect in certain games?

Not all games allow AHK to send keys and clicks or receive pixel colors.

But there are some alternatives, try all the solutions mentioned below. If all these fail, it may not be possible for AHK to work with your game. Sometimes games have a hack and cheat prevention measure, such as GameGuard and Hackshield. If they do, there is a high chance that AutoHotkey will not work with that game.

Use SendPlay via the SendPlay command, SendMode Play and/or the hotstring option SP.

Note: SendPlay may have no effect at all on Windows Vista or later if User Account Control is enabled, even if the script is running as an administrator.

Increase SetKeyDelay. For example:

Try ControlSend, which might work in cases where the other Send modes fail:

Try the down and up event of a key with the various send methods:

Try the down and up event of a key with a Sleep between them:

How can performance be improved for games or at other times when the CPU is under heavy load?

If a script’s Hotkeys, Clicks, or Sends are noticeably slower than normal while the CPU is under heavy load, raising the script’s process-priority may help. To do this, include the following line near the top of the script:

My antivirus program flagged AutoHotkey or a compiled script as malware. Is it really a virus?

Although it is certainly possible that the file has been infected, most often these alerts are false positives, meaning that the antivirus program is mistaken. One common suggestion is to upload the file to an online service such as virustotal or Jotti and see what other antivirus programs have to say. If in doubt, you could send the file to the vendor of your antivirus software for confirmation. This might also help us and other AutoHotkey users, as the vendor may confirm it is a false positive and fix their product to play nice with AutoHotkey.

False positives might be more common for compiled scripts which have been compressed, such as with UPX (default for AutoHotkey 1.0 but not 1.1) or MPRESS (optional for AutoHotkey 1.1). As the default AutoHotkey installation does not include a compressor, compiled scripts are not compressed by default.

Common Tasks

Where can I find the official build, or older releases?

Can I run AHK from a USB drive?

How can the output of a command line operation be retrieved?

Testing shows that due to file caching, a temporary file can be very fast for relatively small outputs. In fact, if the file is deleted immediately after use, it often does not actually get written to disk. For example:

To avoid using a temporary file (especially if the output is large), consider using the Shell.Exec() method as shown in the examples for the Run command.

How can a script close, pause, suspend or reload other script(s)?

First, here is an example that closes another script:

To suspend, pause or reload another script, replace the last line above with one of these:

How can a repeating action be stopped without exiting the script?

To pause or resume the entire script at the press of a key, assign a hotkey to the Pause command as in this example:

To stop an action that is repeating inside a Loop, consider the following working example, which is a hotkey that both starts and stops its own repeating action. In other words, pressing the hotkey once will start the Loop. Pressing the same hotkey again will stop it.

How can context sensitive help for AutoHotkey commands be used in any editor?

How to detect when a web page is finished loading?

With Internet Explorer, perhaps the most reliable method is to use DllCall() and COM as demonstrated at www.autohotkey.com/forum/topic19256.html. On a related note, the contents of the address bar and status bar can be retrieved as demonstrated at www.autohotkey.com/forum/topic19255.html.

Older, less reliable method: The technique in the following example will work with MS Internet Explorer for most pages. A similar technique might work in other browsers:

How can dates and times be compared or manipulated?

To determine the amount of time between two dates or times, see EnvSub, which gives an example. Also, the built-in variable A_Now contains the current local time. Finally, there are several built-in date/time variables, as well as the FormatTime command to create a custom date/time string.

Источник

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *