AHK sample script gives error inside Scite. Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
zopfan
Posts: 8
Joined: 03 Jan 2020, 08:44

AHK sample script gives error inside Scite.

04 Apr 2020, 09:38

Auto Hot Key sample script keeps giving error when compiling in Scite Portable v3.0.06.01

I've made a small video of my problem https://youtu.be/kpGFc6-4_vE.

The problem is that when I run this code inside Scite:

Code: Select all

^j::
Send, My First Scriptt
return
It gives/throws this error:
>"L:\DLs\Websites Designing\2. SciTE4AHK3.0.06.01 Portable\..\AutoHotkey.exe" /ErrorStdOut "L:\Bag\AHScripts\t2.ahk"
'L:\DLs\Websites' is not recognized as an internal or external command,
operable program or batch file.
>Exit code: 1 Time: 0.3938
The first line seems to be ok. The 2nd part ('L:\DLs\Websites' is not recognized as an internal or external command,
operable program or batch file.
>Exit code: 1 Time: 0.3938) is what giving me irritation.

I'm running Scite Portable, without installation.
gregster
Posts: 9086
Joined: 30 Sep 2013, 06:48

Re: AHK sample script gives error inside Scite.  Topic is solved

04 Apr 2020, 09:45

zopfan wrote:
04 Apr 2020, 09:38
I'm running Scite Portable, without installation.
The AHK code is fine.

Clearly something is going wrong with your Scite. The error message doesn't say much.

Can Autohotkey.exe really be found at the path specified? Is it a valid path at all?

Edit:
Your folder structure doesn't seem to fit this requirement:
https://github.com/fincs/SciTE4AutoHotkey/issues/22 wrote:if you do not have AutoHotkey.exe in the proper folder. Any or all of the Autohotkey executables (AutoHotkey.exe, AutoHotkeyA32.exe, AutoHotkeyU32.exe, & AutoHotkeyU64.exe) plus AutoHotkey.chm need to be in the directory above the one with SciTE.exe. An easy way to accomplish this is to drop the portable SciTE's folder in the AutoHotkey folder. Otherwise, you will have to drop copies of the AutoHotkey executable(s) and AutoHotkey.chm in the folder above your SciTE folder.
https://fincs.ahk4.net/scite4ahk/ wrote:Portable .ZIP - designed for USB sticks. Extract this archive to your portable AutoHotkey folder.
You seem to have it the other way round...
zopfan
Posts: 8
Joined: 03 Jan 2020, 08:44

Re: AHK sample script gives error inside Scite.

04 Apr 2020, 10:19

Thank God!!
I didn't know that Scite too needed AutoHotKey files. I thought it has ahk files in itself.

As soon as, I moved the 3-4 needed files (AutoHotkey.exe, AutoHotkeyU64.exe, AutoHotkey.chm, Installer.ahk, WindowSpy.ahk) at 1 level up folder (or say moved the scite folder inside that ahk folder, that one/main error disappeared.

But now only 1st line error remains:
>"L:\DLs\Websites Designing\4. AHK v1.1.32.0 Installed\2a. SciTE4AHK3.0.06.01 Portable+\..\AutoHotkey.exe" /ErrorStdOut "L:\Bag\AHScripts\t1.ahk"
I'm pasting the exact error msg by copying pasting. I don't know if the two dots (..) after 'Portable+\ are always shown in long paths or there is some problem).
I don't think a screenshot or video is requird, (tried but couldn't insert the image here). Would upload and share later.


I'm highly thankful to you.
I'm also going to read the links sent by you in the mean time.
Thanks very very much again.
I was banging my head again and again since morning by reinstalling both/all wares, rebooting pc, recreating ahk files and similar.
gregster
Posts: 9086
Joined: 30 Sep 2013, 06:48

Re: AHK sample script gives error inside Scite.

04 Apr 2020, 10:25

But now only 1st line error remains:
If there is no exit code, the script is most likely running. The one line you are seeing is normal for a started script in Scite - and indicates no error. it's just the executed command line...
(As soon as you exit that script successfully, an >Exit code: 0 line will appear. This is also normal. Other exit codes, mainly 1, would indicate an error.)

Did you try the hotkey you defined in your script?
Are there running scripts visible in the system tray?
zopfan
Posts: 8
Joined: 03 Jan 2020, 08:44

Re: AHK sample script gives error inside Scite.

04 Apr 2020, 22:42

Thank you thank you thank you.


I didn't expect so exact response so fast.
Nor did I expect such a solution.

I spend almost 2 days, and could go on spending more, but I couldn't have judged or found this solution that it needs ahk executable just one level up.

And almost equal good was your 2nd response.

Thank you.
God bless you.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: No registered users and 193 guests