help with my first GUI

Get help with using AutoHotkey and its commands and hotkeys
Coder
Posts: 38
Joined: 08 Feb 2018, 09:06

help with my first GUI

12 Jun 2019, 10:03

Hello everyone,

Can anyone please shad some light why the following simple codes do't work for me?
I am currently using Portable version if this matters.

The error message:
The filename, directory name, or volume label syntax is incorrect.
>Exit code: 1 Time: 0.8219

Code: Select all

#SingleInstance, force

Gui, +AlwaysOonTop
Gui, Add, Text,, Hello world
gui, Add, Button , Default, Ok

GuiClose:
ExitApp
GuiEscape:
ExitApp
gregster
Posts: 2397
Joined: 30 Sep 2013, 06:48

Re: help with my first GUI

12 Jun 2019, 10:10

I don't get that error message you are describing.
But there is a syntax error in +AlwaysOnTop (one o too much):

Code: Select all

#SingleInstance, force

Gui, +AlwaysOnTop
Gui, Add, Text,, Hello world
gui, Add, button , Default, Ok
gui, Show
return

GuiClose:
ExitApp
GuiEscape:
ExitApp
Also, you need a return at the end of the auto-execute section. Otherwise, the code will run unstopped into the label 'GuiClose' and ExitApp, which will exit the script immediately.
Coder
Posts: 38
Joined: 08 Feb 2018, 09:06

Re: help with my first GUI

12 Jun 2019, 10:27

Thank you so much for your corrections and notes.

I modified the codes but still don't work for me.
Attachments
Untitled.gif
Untitled.gif (183.71 KiB) Viewed 61 times
gregster
Posts: 2397
Joined: 30 Sep 2013, 06:48

Re: help with my first GUI

12 Jun 2019, 10:36

Doesn't look like a code problem - does any script run?

Looks more like a problem with the path to Autohotkey.exe or similar - perhaps this is caused by a faulty installation. But hard to say from here.
gregster
Posts: 2397
Joined: 30 Sep 2013, 06:48

Re: help with my first GUI

12 Jun 2019, 10:42

Perhaps this helps:
https://github.com/fincs/SciTE4AutoHotkey/issues/22 wrote: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.
Coder
Posts: 38
Joined: 08 Feb 2018, 09:06

Re: help with my first GUI

12 Jun 2019, 10:56

Why things complicated like that for me? :shock:

Return to “Ask For Help”

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], tarbear123, toralf and 194 guests