AutoHotkey front page still features v1 syntax. Topic is solved

Discuss issues and requests related with the forum software
Andrew1802
Posts: 23
Joined: 02 Jul 2020, 07:28

AutoHotkey front page still features v1 syntax.

24 Feb 2023, 04:59

Seeing as V2 is officially released and the default download link for AHK points to that version, shouldn't its syntax be featured on the front page instead of V1 syntax?
image.png
image.png (458.63 KiB) Viewed 2249 times
User avatar
Animan8000
Posts: 58
Joined: 11 May 2022, 05:00
Contact:

Re: AutoHotkey front page still features v1 syntax.

24 Feb 2023, 10:19

Yea I noticed that too, but there's also the message still that mentions the transition period, so I'd assume that may be changed in the near future and the team is actively working on updating the site and probably isn't finished yet.
Ben G
Posts: 42
Joined: 22 Feb 2023, 20:53
Contact:

Re: AutoHotkey front page still features v1 syntax.

24 Feb 2023, 10:24

I can contribute some V2 GUI example code if you need it. ;)
User avatar
joedf
Posts: 8966
Joined: 29 Sep 2013, 17:08
Location: Canada
Contact:

Re: AutoHotkey front page still features v1 syntax.

24 Feb 2023, 14:55

Oh shoot! Thanks for bringing this up! :+1:

@gregster @boiler
Can you sort out some examples? I can update the homepage later on. Let me know, thanks!
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]
User avatar
boiler
Posts: 16986
Joined: 21 Dec 2014, 02:44

Re: AutoHotkey front page still features v1 syntax.

24 Feb 2023, 21:49

How about these? They are largely the same as what was in the original but translated to v2 (the second one needed some additional code to get it to work since Windows' copy/paste is now slower than in older versions).

I kept the same leading two spaces before each line, which looks like is meant to help display it better in the code box.

Also, it looks like the Rosetta Code page that is linked next to those examples has some links in it that still point to v1 stuff.

Code: Select all

  ; hotstrings - expand 'btw' to 'By the way' as you type
  ::btw::By the way
 
  ; hotkeys - press winkey-z to go to Google
  #z::Run "http://google.com"

Code: Select all

  ; copy text to the clipboard, modify it, paste it back
  ^+k:: ; ctrl-shift-k
  {
      ClipSave := ClipboardAll() ; store current clipboard
      A_Clipboard := "" ; clear the clipboard
      Send "^c" ; copy selected text
      if ClipWait(1) ; wait up to a second for content
      {
          A_Clipboard := "<i>" A_Clipboard "</i>" ; wrap it in html-tags
          Send "^v" ; paste
          Sleep 500 ; wait for Windows to complete paste
      }
      A_Clipboard := ClipSave ; restore old clipboard content
      ClipSave := "" ; clear variable
  }

Code: Select all

  ; Easy to make GUIs
  MyGui := Gui()
  MyGui.Add("Text",, "Enter your name")
  MyGui.Add("Edit", "w150 vName")
  MyGui.Add("Button",, "OK").OnEvent("Click", SayHello)
  MyGui.Show()
  Return
 
  SayHello(*)
  {
      Saved := MyGui.Submit()
      MsgBox "Hello " Saved.Name
      ExitApp
  }

Code: Select all

  ; Array Objects
  Colors := "Red,Green,Blue"           ; string
  ColorArray := StrSplit(Colors, ",")  ; create array
 
  ColorArray.Push("Purple")            ; add data
 
  for index, element in ColorArray     ; Read from the array
      MsgBox "Color " index " = " element
User avatar
joedf
Posts: 8966
Joined: 29 Sep 2013, 17:08
Location: Canada
Contact:

Re: AutoHotkey front page still features v1 syntax.

24 Feb 2023, 21:56

@boiler this is excellent, thank you so much. It's a big help for me. :+1:
Added to my to-do list.
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]
User avatar
Animan8000
Posts: 58
Joined: 11 May 2022, 05:00
Contact:

Re: AutoHotkey front page still features v1 syntax.

25 Feb 2023, 04:02

joedf wrote:
24 Feb 2023, 21:56
@boiler this is excellent, thank you so much. It's a big help for me. :+1:
Added to my to-do list.
Weird question, but can you (if not done already) make the main page open source? So that anyone can contribute. Some sources and communities of AHK (such as the Discord community) are missing or outdated, unless v1 learning sources should stay. If v1 learning sources are supposed to stay for some reason, then I personally find it may be a good idea to keep a download button on the home page for v1.1, but with the text "(Deprecated)" after it.

There's also more forks out there. All mentioned ones are archived or outdated (I think?) and there's several other ones out there such as Keysharp and AHK_X11 that are in active development but not listed there. Additionally AHK_H by Hotkeyit is inactive and the new maintainer and fork is by Thqby instead of Hotkeyit.

There's also several YouTubers out there regarding AHK, that I found are probably also worth adding. Smaller and bigger creators.
User avatar
boiler
Posts: 16986
Joined: 21 Dec 2014, 02:44

Re: AutoHotkey front page still features v1 syntax.

25 Feb 2023, 07:30

Animan8000 wrote: Weird question, but can you (if not done already) make the main page open source? So that anyone can contribute.
If you are asking if it can be made such that anyone can edit the main AHK page to add the links, etc., I’m comfortable in answering for the staff administrators and say that’s a hard no. That would be chaos. You should see how many spam posts get rejected every day. The main page would be filled with spam and other malicious content.

Animan8000 wrote: Some sources and communities of AHK (such as the Discord community) are missing or outdated, unless v1 learning sources should stay. If v1 learning sources are supposed to stay for some reason, then I personally find it may be a good idea to keep a download button on the home page for v1.1, but with the text "(Deprecated)" after it.
In my opinion, learning resources for v1 should probably removed, and a download of v1 should not be featured. It is still available but we should not highlight it.
User avatar
Animan8000
Posts: 58
Joined: 11 May 2022, 05:00
Contact:

Re: AutoHotkey front page still features v1 syntax.

25 Feb 2023, 08:35

If you are asking if it can be made such that anyone can edit the main AHK page to add the links, etc., I’m comfortable in answering for the staff administrators and say that’s a hard no. That would be chaos. You should see how many spam posts get rejected every day. The main page would be filled with spam and other malicious content.

My idea was to make it open source on GitHub, exactly the same way as with the documentation. Changes, in form of pull requests, can only be accepted by people like Lexikos and whoever else is in the private AutoHotkey GitHub organization. Making it public edit-able like a Wikipedia page or Google Doc is more than obviously a bad idea, but with GitHub the maintainers have full control and with Git it's also easy of keeping track of changes, so that may actually be really convenient for anyone who wants to improve the home page while keeping full control of what's there.
User avatar
joedf
Posts: 8966
Joined: 29 Sep 2013, 17:08
Location: Canada
Contact:

Re: AutoHotkey front page still features v1 syntax.

27 Feb 2023, 17:51

Tank had done something to make the homepage and other parts open-source on github as well, but I guess we never got to it.
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]
User avatar
joedf
Posts: 8966
Joined: 29 Sep 2013, 17:08
Location: Canada
Contact:

Re: AutoHotkey front page still features v1 syntax.  Topic is solved

27 Feb 2023, 18:58

Okay, examples have been updated! :+1:

Spruced up the UI and fonts and little bit too.
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]
Ben G
Posts: 42
Joined: 22 Feb 2023, 20:53
Contact:

Re: AutoHotkey front page still features v1 syntax.

27 Feb 2023, 20:32

@joedf Are you sure?
Still see the same code and fonts:
Image
-Ben G
My Website (it's still in production).
Running Windows 11 Home on a 64-bit laptop.
User avatar
boiler
Posts: 16986
Joined: 21 Dec 2014, 02:44

Re: AutoHotkey front page still features v1 syntax.

27 Feb 2023, 21:02

Ben G wrote: @joedf Are you sure?
Still see the same code and fonts:
It has been changed. You apparently need to clear your browser cache.
Ben G
Posts: 42
Joined: 22 Feb 2023, 20:53
Contact:

Re: AutoHotkey front page still features v1 syntax.

28 Feb 2023, 10:45

@boiler I see the new page now. :bravo:
-Ben G
My Website (it's still in production).
Running Windows 11 Home on a 64-bit laptop.

Return to “Forum Issues”

Who is online

Users browsing this forum: No registered users and 36 guests