AHK Studio

Editor for AutoHotkey written completely in AutoHotkey.

Moderator: maestrith

Rafaews
Posts: 25
Joined: 16 Mar 2018, 21:19

Re: AHK Studio

Post by Rafaews » 16 Nov 2020, 10:07

I have a little suggestion:

Add a tag [Admin] or [User] to AHK Studios' title.

I've been using this modification for a while but I just now realized that it might be helpful to other people :'D

Because of those problems related to user rights.
- If the script is already running with adm, and you try to reload it with AHKS in normal privileges it won't be able to restart the process.
- If you have AHK Studio running with adm, and you are doing something that needs normal privileges it will lead to undesired results.
That kind of stuff...

This is what I did:
image.png
image.png (6.66 KiB) Viewed 7420 times
Take care :wave:
Attachments
My Mods - Forum.ahk
I usually drop and run this inside AHK Studio's folder.
(1.22 KiB) Downloaded 263 times

NorInd
Posts: 43
Joined: 03 May 2020, 04:23

Re: AHK Studio

Post by NorInd » 07 Dec 2020, 11:13

BennettBenson wrote:
14 Oct 2020, 14:09
I just downloaded AHK Studio from github. It's a zip file and I get asked if I want to overwrite 2 files when I unzip it. There are 2 different Readme.md files (not a big deal) but there are also 2 different commands.xml. One has a Capital C and the other does not. Same date/time but different sizes. Which one is correct?
@BennettBenson
Having the same question. version 1.005.32
Last edited by NorInd on 07 Dec 2020, 11:38, edited 1 time in total.

NorInd
Posts: 43
Joined: 03 May 2020, 04:23

Re: AHK Studio

Post by NorInd » 07 Dec 2020, 11:29

mankvl wrote:
14 Sep 2020, 06:56
maestrith wrote:
09 Sep 2020, 13:06
You need to make sure that in the Lib\Languages folder there is a file called ahk.xml in there. If not and you don't have access to the internet you need to download it from another PC and put it there.
It's there but still stuck on startup for me :/
I have the same issue.
When I have access to the internet. And I start AHKStuodio.ahk. It will go to download ahk.xml for 10 sec, and then open up the AHK Studio.
When I disconnect from the internet. And I start AHKStuodio.ahk, it stucks on the "downloading ahk.xml" forever.
How do you solve this? v1.005.32

NorInd
Posts: 43
Joined: 03 May 2020, 04:23

Re: AHK Studio

Post by NorInd » 07 Dec 2020, 18:30

takayo97 wrote:
28 Dec 2018, 18:59
how do make TAB as SPACES ?
Same question. I like using "tab key" to do indentation (with length of 2 white spaces). But I dont want to use "2-space-width Tab" as indentations, I prefer just "2 spaces" to be the identations.
Because tabs often get messed up if I open the file with other software or editors, (or get messed up if I copy and paste the code to other files).

Rafaews
Posts: 25
Joined: 16 Mar 2018, 21:19

Re: AHK Studio

Post by Rafaews » 07 Dec 2020, 18:49

It will go to download ahk.xml for 10 sec, and then open up the AHK Studio.
I had to go back and use an earlier version. This download every time I would open the program was driving me crazy.

mankvl
Posts: 25
Joined: 23 Sep 2016, 03:58

Re: AHK Studio

Post by mankvl » 08 Dec 2020, 04:47

Rafaews wrote:
07 Dec 2020, 18:49
It will go to download ahk.xml for 10 sec, and then open up the AHK Studio.
I had to go back and use an earlier version. This download every time I would open the program was driving me crazy.
Add noupdate.txt to fix the problem :)

NorInd
Posts: 43
Joined: 03 May 2020, 04:23

Re: AHK Studio

Post by NorInd » 08 Dec 2020, 21:13

mankvl wrote:
08 Dec 2020, 04:47
Add noupdate.txt to fix the problem :)
Does it work on your computer? Just an empty txt file call noupdate.txt right? I tried it before and tried it just now (tried NoUpdate.txt too), its not working for me. v1.005.32
I have to use v1.005.19 to fix that problem.

--- update ---
Well, I just checked the code in AHK-Studio.ahk & github.
In github, the code committed is::
}v.LineEdited:=[],v.LinesEdited:=[],v.RunObject,ComObjError(0),new Keywords(),(FileExist("NoUpdate.txt")?"":FileCheck(%True%))
But when you download it, there is no FileExist("NoUpdate.txt") in AHK-Studio.ahk
not sure why.

User avatar
kczx3
Posts: 1640
Joined: 06 Oct 2015, 21:39

Re: AHK Studio

Post by kczx3 » 08 Dec 2020, 21:33

Probably because you downloaded a release rather than the current development code. Or you downloaded from a different branch

mankvl
Posts: 25
Joined: 23 Sep 2016, 03:58

Re: AHK Studio

Post by mankvl » 11 Dec 2020, 04:27

NorInd wrote:
08 Dec 2020, 21:13
mankvl wrote:
08 Dec 2020, 04:47
Add noupdate.txt to fix the problem :)
Does it work on your computer? Just an empty txt file call noupdate.txt right? I tried it before and tried it just now (tried NoUpdate.txt too), its not working for me. v1.005.32
I have to use v1.005.19 to fix that problem.

--- update ---
Well, I just checked the code in AHK-Studio.ahk & github.
In github, the code committed is::
}v.LineEdited:=[],v.LinesEdited:=[],v.RunObject,ComObjError(0),new Keywords(),(FileExist("NoUpdate.txt")?"":FileCheck(%True%))
But when you download it, there is no FileExist("NoUpdate.txt") in AHK-Studio.ahk
not sure why.
make sure it's NoUpdate file, .txt is already there, first time i created NoUpdate.txt.txt and it was not working :)

mankvl
Posts: 25
Joined: 23 Sep 2016, 03:58

Re: AHK Studio

Post by mankvl » 11 Dec 2020, 09:32

Anyone have a problem where studio won't show why script is not running?

Code: Select all

!Up::
return

123132132
this is just an example but script is not running because of the numbers. Temp fix is to turn off studio open it again the it works for few runs but after some time it just gets stuck again.

NorInd
Posts: 43
Joined: 03 May 2020, 04:23

Re: AHK Studio

Post by NorInd » 20 Dec 2020, 15:19

kczx3 wrote:
08 Dec 2020, 21:33
Probably because you downloaded a release rather than the current development code. Or you downloaded from a different branch
Situation::
I think your are correct.
1. So I download the code as zip from the main page in github instead of from the release.
When I extract the zip, I click No for the replacement of the Readme.md file & another Command.xml file.
2. Then I opened AHK studio, let it update and turned it off.
3. Then I created a file "NoUpdate.txt" at the same directory. And started AHK studio.
The following message popped up:

---------------------------
AHK-Studio.ahk
---------------------------
Error: Unregistered window class.

Specifically: Scintilla

Line#
2960: }
2961: if (!init)
2962: DllCall("LoadLibrary","str",A_ScriptDir "\scilexer.dll"),init:=1
2963: v.im:=info.main,v.ip:=info.pos,v.iw:=info.win,notify:=info.notify,win:=window?window:1,pos:=info.pos?info.pos:"x0 y0 w0 h0"
2964: if (info.hide)
2965: pos.=" Hide"
2966: mask:=0x10000000|0x400000|0x40000000,notify:=notify?notify:"notify"
---> 2967: Gui,%win%:Add,custom,%pos% classScintilla +%mask% hwndsc g%notify%
2968: For a,b in {fn:2184,ptr:2185}
2969: this[a]:=DllCall("SendMessageA",UInt,sc,int,b,int,0,int,0)
2970: this.parent:=sc,this.sc:=sc+0
2971: if (!info.notify)
2972: s.ctrl[sc]:=this
2973: For a,b in [[2563,1],[2565,1],[2614,1],[2124,1]]
2974: this[b.1](b.2,b.3?b.3:0)

The current thread will exit.
---------------------------

---------------------------


4. I ignored it, closed it, exit AHK Studio at the tray icon.
5. I deleted the NoUpdate.txt file, then I started AHK Studio again. This time there was no more update from AHK studio, and I was happy.

Question::
But why did the message pop up, should that happen under the normal procedure?

User avatar
kunkel321
Posts: 982
Joined: 30 Nov 2015, 21:19

Re: AHK Studio

Post by kunkel321 » 30 Dec 2020, 11:16

Hi Folks, I thought I'd give AHK Studio a try. Before I even get started though... I want to make sure that my setup is appropriate, so that I (hopefully) won't run into any big hangups. This is my work computer and I am not an "administrator" of the computer. I have autohotkey at the folder location:
C:/PortableApps/AutoHotkey/
it works fine. My main script is a
C:\PortableApps\AutoHotkey\AutoCorrect\AutoCorrect2020.exe

I can't really run any installers, so everything gets used as "portable" applications.

Just now I put AHK Studio at
C:\PortableApps\AutoHotkey\AHK-Studio-master\

The zip file had AHK-Studio.ahk, but not the exe. So I got the latest zip of AutoHotkey v1 (1.1.33.02). I copied AutoHotkeyU32.exe into the AHK-Studio-Master folder and named it AHK-Studio.exe.

It seems to launch as expected. Do you guys (and gals) see any potential problems with this setup?
ste(phen|ve) kunkel

User avatar
kunkel321
Posts: 982
Joined: 30 Nov 2015, 21:19

Re: AHK Studio

Post by kunkel321 » 30 Dec 2020, 13:59

Has anyone made an AHK-Studio color theme to visually match that of SciTE4AHK? The default theme with the dark background hurts my eyes a bit. I see how to change the themes, but the ones with light backgrounds all seem to have text that it too light.

EDIT:
I tried to copy the SciTE colors. The below screenshot has the bgmCoder theme on the left. I copy-n-pasted the the contents into SciTE, which is the middle. On the left is my recreation. It looks like AHK-Studio actually lets you colorize more unique components than what is suggested in the default SciTE theme. I made use of that a bit. I didn't change the background color because I didn't see how.

Below the screenshot is the xml code that got exported.

Image
Spoiler
Last edited by kunkel321 on 31 Dec 2020, 13:40, edited 1 time in total.
ste(phen|ve) kunkel

hotomol
Posts: 8
Joined: 31 Dec 2020, 04:56

Re: AHK Studio

Post by hotomol » 31 Dec 2020, 05:10

maestrith wrote:
16 Oct 2013, 14:14
Hi maestrith,

First off, congrats for this amazing job.

I have two questions:

a) which of the .xml files does save the re-defined hotkeys in AHK-Studio?

b) Which would be the best way to save the custom settings in AHK-Studio for future installations?

Thanks

User avatar
metacognition
Posts: 117
Joined: 22 Oct 2014, 05:57
Location: Alaska
Contact:

Re: AHK Studio

Post by metacognition » 24 Jan 2021, 13:22

Is it possible to have indentation insert spaces instead of a tab character? The visual breaks on github and spaces will alway show consistently.

I had this in scite4authotkey but can't find in ahk studio.
2021-01-24_09-18-39.png
2021-01-24_09-18-39.png (44.8 KiB) Viewed 6768 times

SOTE
Posts: 1426
Joined: 15 Jun 2015, 06:21

Re: AHK Studio

Post by SOTE » 24 Jan 2021, 22:23

metacognition wrote:
24 Jan 2021, 13:22
Is it possible to have indentation insert spaces instead of a tab character? The visual breaks on github and spaces will alway show consistently.
At the very least, it should be both. A lot of people uses tabs, and that way is neater. Spaces tend to get messy, because how many spaces used varies by each person, though there are also a lot of people with that preference and certain programming languages where it's part of their culture.

User avatar
metacognition
Posts: 117
Joined: 22 Oct 2014, 05:57
Location: Alaska
Contact:

Re: AHK Studio

Post by metacognition » 24 Jan 2021, 22:50

well I would argue its the same neatness as long as the editor is aware and can calculate at which column tabs should align when converting to spaces. In my scenario you wouldn't know the difference unless you had whitespace characters turned on like in my picture above. scite4autohotkey would automatically convert tabs to 5 spaces so that it would line up correctly, the problem happens on lines that don’t necessarily start with a tab where the tabbing is after or mid code, say you are using tabs to align assignment operators when setting a number of variables... github will render it wonky because of the width github assigns to tabs (8 columns I believe). I’ll try and post a side by side comparison to demonstrate.

User avatar
metacognition
Posts: 117
Joined: 22 Oct 2014, 05:57
Location: Alaska
Contact:

Re: AHK Studio

Post by metacognition » 25 Jan 2021, 00:20

"Someone at GitHub hates tabs" --> https://github.community/t/whats-the-deal-with-tab-sizes-on-github-gists/954/6


2021-01-24_20-04-28.png
2021-01-24_20-04-28.png (36.29 KiB) Viewed 6727 times
2021-01-24_20-07-19.png
2021-01-24_20-07-19.png (32.53 KiB) Viewed 6727 times
2021-01-24_20-05-28.png
2021-01-24_20-05-28.png (28.63 KiB) Viewed 6727 times

User avatar
metacognition
Posts: 117
Joined: 22 Oct 2014, 05:57
Location: Alaska
Contact:

Re: AHK Studio

Post by metacognition » 25 Jan 2021, 01:52

2021-01-24_21-32-40.png
2021-01-24_21-32-40.png (40.6 KiB) Viewed 6719 times
2021-01-24_21-32-11.png
2021-01-24_21-32-11.png (46.07 KiB) Viewed 6719 times
2021-01-24_21-25-19.png
2021-01-24_21-25-19.png (17.82 KiB) Viewed 6719 times

User avatar
joedf
Posts: 8940
Joined: 29 Sep 2013, 17:08
Location: Canada
Contact:

Re: AHK Studio

Post by joedf » 25 Jan 2021, 09:15

Image Image Image Image Image
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]

Post Reply

Return to “AHK Studio”