https://github.com/FuPeiJiang/ahk_parser.js#readme
convert v1->AHK_H v2
try here! https://fupeijiang.github.io/ahk_parser.js/
(everything will be on github so I don't have to copy twice + it has version control)
ahk_parser.js (convert v1->AHK_H v2) and what else ?
ahk_parser.js (convert v1->AHK_H v2) and what else ?
Last edited by MrDoge on 26 May 2021, 08:26, edited 1 time in total.
Re: ahk_parser.js (convert v1->AHK_H v2) and what else ?
This looks amazing!
In the readme, you wrote:
In the readme, you wrote:
That sounds brilliant. Would it be a place where I could upload my v1 code and have it converted to v2? Are you seriously considering that?Make a website so it could be used online (github.io ?) (your code is not sent nor stolen: just disconnect internet and you'll see that it still works)
Re: ahk_parser.js (convert v1->AHK_H v2) and what else ?
ty!
I want github.io to automatically update the website whenever I push to default branch
but weekdays are starting.. might have to wait, I am more impatient
this SHOULD be the easy part (2 <textarea> and 1 <button> and connect it)a place where I could upload my v1 code and have it converted to v2
I want github.io to automatically update the website whenever I push to default branch
but weekdays are starting.. might have to wait, I am more impatient
Re: ahk_parser.js (convert v1->AHK_H v2) and what else ?
@JoeSchmoe
gg the site is live : https://fupeijiang.github.io/ahk_parser.js/
though idk how to cache the website with github.io yet (for offline)
you CAN perfectly ctrl+s to save the website
and you will have:
Downloads\fupeijiang.github.io_files
Downloads\fupeijiang.github.io.html
then disconnect internet and open `fupeijiang.github.io.html` with chrome or another browser
it will work THE SAME
gg the site is live : https://fupeijiang.github.io/ahk_parser.js/
though idk how to cache the website with github.io yet (for offline)
you CAN perfectly ctrl+s to save the website
and you will have:
Downloads\fupeijiang.github.io_files
Downloads\fupeijiang.github.io.html
then disconnect internet and open `fupeijiang.github.io.html` with chrome or another browser
it will work THE SAME
Re: ahk_parser.js (convert v1->AHK_H v2) and what else ?
very nice
this was an older attempt here:
https://github.com/mmikeww/AHK-v2-script-converter
it might not be useful for you, but you could check all the Tests to confirm your parser fixes them all
this was an older attempt here:
https://github.com/mmikeww/AHK-v2-script-converter
it might not be useful for you, but you could check all the Tests to confirm your parser fixes them all
Re: ahk_parser.js (convert v1->AHK_H v2) and what else ?
That looks great.
As we approach the first beta of v2.0, this could be a very useful resource for the community as more people want to convert from 1.1 to 2.0beta. I'm using it now and much prefer it, but I still have an enormous old script that runs 1.1.
Right now I'm super busy, but I'll post more when I am able to do more AHK work.
Re: ahk_parser.js (convert v1->AHK_H v2) and what else ?
converted another script : https://raw.githubusercontent.com/FuPeiJiang/ahk_parser.js/convert_this/tov2/!get%20colour_mid.ahk
try converting it here : https://fupeijiang.github.io/ahk_parser.js/
did: CoordMode, MouseGetPos, MouseMove, PixelGetColor, PixelSearch
wrap
f3::
ExitApp
into
f3::
{
ExitApp
}
try converting it here : https://fupeijiang.github.io/ahk_parser.js/
did: CoordMode, MouseGetPos, MouseMove, PixelGetColor, PixelSearch
wrap
f3::
ExitApp
into
f3::
{
ExitApp
}
Re: ahk_parser.js (convert v1->AHK_H v2) and what else ?
ty @guest3456
I will extract the tests from https://github.com/mmikeww/AHK-v2-script-converter/blob/master/tests/Tests.ahk
they know a lot
now, there's more understanding to do..
but first, I want to convert this :) https://www.autohotkey.com/boards/viewtopic.php?f=6&t=74647
I will extract the tests from https://github.com/mmikeww/AHK-v2-script-converter/blob/master/tests/Tests.ahk
they know a lot
now, there's more understanding to do..
but first, I want to convert this :) https://www.autohotkey.com/boards/viewtopic.php?f=6&t=74647
Re: ahk_parser.js (convert v1->AHK_H v2) and what else ?
keep in mind, those Tests are for an older version of AHK v2, but they still might be useful to add to your testsMrDoge wrote: ↑04 Jun 2021, 08:04I will extract the tests from https://github.com/mmikeww/AHK-v2-script-converter/blob/master/tests/Tests.ahk
they know a lot
now, there's more understanding to do..
Re: ahk_parser.js (convert v1->AHK_H v2) and what else ?
RunCMD() converted! : RunCMD.ah2
fixed: so that it removes: #NoEnv, SetBatchLines
fixed: #SingleInstance
added Mocha unit tests: `yarn test`
here: mocha/test.ts
fixed: when you paste a large script, then it freezes when you paste something else.. OR cannot read property .text of undefined
file.ReadLine() includes EOL(end of line) in V1, but not in V2, so I had to append a "`n" manually
lines 31 : sOutput .= Fn ? Fn.Call(Line, LineNum++) : Line "`n"
anyone has an idea how to do it automatically ? without sacrificing performance ?
instead of using `Global A_Args.RunCMD.PID` I replaced it with `Global RunCMD_PID`
anyone has an idea how to do it automatically ? without sacrificing performance ?
fixed: so that it removes: #NoEnv, SetBatchLines
fixed: #SingleInstance
added Mocha unit tests: `yarn test`
here: mocha/test.ts
add tests like this : doIt('v:={}','v:=Map()')
or for files : doItFiles('../tests3/listlines.ahk','correct/listlines.ah2')
or for files : doItFiles('../tests3/listlines.ahk','correct/listlines.ah2')
fixed: when you paste a large script, then it freezes when you paste something else.. OR cannot read property .text of undefined
Re: ahk_parser.js (convert v1->AHK_H v2) and what else ?
Hey, @MrDoge, did you see the following post from Lexikos?
I was quite happy to see that you made a commit on the very day that Lex posted the announcement. Does this mean that your script is up to date on beta 1?
Here's the announcement thread:
https://www.autohotkey.com/boards/viewtopic.php?f=24&t=93011
Your script could be quite useful to those who want to update to the v2beta! With future releases expected to be backward compatible, now seems to be the time to switch to v2.lexikos wrote: ↑24 Jul 2021, 19:28AutoHotkey v2.0-beta.1 is now available.
Any further changes prior to the final v2.0.0 release should be of a minor nature (such as improvements to the error and warning dialogs), and should not affect the functionality of scripts. In other words, future releases are expected to be backward-compatible.
I was quite happy to see that you made a commit on the very day that Lex posted the announcement. Does this mean that your script is up to date on beta 1?
Here's the announcement thread:
https://www.autohotkey.com/boards/viewtopic.php?f=24&t=93011
Re: ahk_parser.js (convert v1->AHK_H v2) and what else ?
@JoeSchmoe thanks for linking the thread, it seems like a rejoice/party
there is another button for AHK_L v2 though, but there isn't much difference now
it's a bit, exhausting, to work on this
if I work on this, it will probably be 1-3 fixes every few days
if you look at this graph, you can see periods of [], then, the decline..
(if I were to guess, the 1st hill/bump is the parser, 2nd hill, the converter, then, lost of intense interest (cause, not fully clear to me)
I'm learning parsing pdf now, I want to replace text in pdf, to translate pdf
no, I use AHK_H v2, which hasn't been updatedDoes this mean that your script is up to date on beta 1?
there is another button for AHK_L v2 though, but there isn't much difference now
it's a bit, exhausting, to work on this
if I work on this, it will probably be 1-3 fixes every few days
if you look at this graph, you can see periods of [], then, the decline..
(if I were to guess, the 1st hill/bump is the parser, 2nd hill, the converter, then, lost of intense interest (cause, not fully clear to me)
I'm learning parsing pdf now, I want to replace text in pdf, to translate pdf
Re: ahk_parser.js (convert v1->AHK_H v2) and what else ?
Thank you for fixing the last issue I posted on Github. I was able to get through a 3000 line script with only that error and one more (I just posted the second one as an issue on Github).
I hope you continue with occasional updates. The code is quite useful!
I hope you continue with occasional updates. The code is quite useful!
Re: ahk_parser.js (convert v1->AHK_H v2) and what else ?
lol that was you
Re: ahk_parser.js (convert v1->AHK_H v2) and what else ?
omg, @guest3456, I thought https://github.com/mmikeww/AHK-v2-script-converter was owned by @ mikeyww, but is this you ?
I mean, are you mmikeww? It was the same name to me
mmikeww
mikeyww
ok, now I see it
I mean, are you mmikeww? It was the same name to me
mmikeww
mikeyww
ok, now I see it
Re: ahk_parser.js (convert v1->AHK_H v2) and what else ?
i dont know who mikeYww is, but yes that github account is mine, not hisMrDoge wrote: ↑02 Aug 2021, 15:13omg, @guest3456, I thought https://github.com/mmikeww/AHK-v2-script-converter was owned by @ mikeyww, but is this you ?
I mean, are you mmikeww? It was the same name to me
mmikeww
mikeyww
ok, now I see it
Return to “Scripts and Functions (v1)”
Who is online
Users browsing this forum: effel and 87 guests