Javascript to ahk
-
- Posts: 16
- Joined: 10 Jun 2016, 10:46
Javascript to ahk
I built an array in javascript, in a greasemonkey extension, in a browser that does not use COM. I'm trying to directly import it into AHK. Is there any way this can be done?
Re: Javascript to ahk
*Directly* import it? Well, there's FileRead (and related commands like Loop, Read). An example of where a greasemonkey script resides is in my firefox folder at C:\Users\Exaskryz\AppData\Roaming\Mozilla\Firefox\Profiles\idnumber.default\gm_scripts. You can get to here by typing in %appdata% and {enter} in your windows explorer, which brings you to the Roaming folder. Then navigate for your Browser Company then Browser. (Mozilla->Firefox; Moonchild Productions->Pale moon.) I'm not sure where to go for Chrome, as I don't have any Google or Chrome folder in my AppData\Roaming. And I can't find my expected extensions (AdBlock) inside of C:\Program Files (x86)\Google\Chrome\Application. I'm sure you can google for that bit though.
Or do you mean to import it by just copy and pasting into an editor and then translating the array into AHK syntax? Not sure on that one. But I feel like RegExReplace() or StrReplace() might be a useful tool.
Or do you mean to import it by just copy and pasting into an editor and then translating the array into AHK syntax? Not sure on that one. But I feel like RegExReplace() or StrReplace() might be a useful tool.
Re: Javascript to ahk
If possible - write down the array to JSON file and then load it in AHK using JSON/JXON library.
Use
Code: Select all
[/c] forum tag to share your code.
Click on [b]✔[/b] ([b][i]Accept this answer[/i][/b]) on top-right part of the post if it has answered your question / solved your problem.
-
- Posts: 16
- Joined: 10 Jun 2016, 10:46
Re: Javascript to ahk
Thanks guys.
Who is online
Users browsing this forum: Marium0505, mcl and 354 guests