Using an embedded (resource) .jsx file

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
User avatar
WarlordAkamu67
Posts: 281
Joined: 21 Mar 2023, 06:52

Using an embedded (resource) .jsx file

Post by WarlordAkamu67 » 04 Dec 2024, 14:01

Using the code from the 2 following links, I have been able to load pictures and play sounds from an executable, without actually installing the files onto the machine.
viewtopic.php?f=82&t=132903&hilit=resource
viewtopic.php?f=82&t=131968&hilit=resource

I would like to run a .jsx file that is included as a resource via FileInstall() or ;@Ahk2Exe-AddResource without actually installing the file on the local machine. I currently have a set up that basically does this:

Code: Select all

F2::
deleteUnusedSwatches(*) {
	FileInstall("Z:\01 EMPLOYEE FILES\00 Me\Code\JavaScript_Currently_Used\Delete_Unused_Swatches.jsx", A_Temp "\Delete_Unused_Swatches.jsx", 1)
	RunWait("Illustrator.exe " A_Temp "\Delete_Unused_Swatches.jsx", , "Max")
	return
}
How do I create a function like loadExtJava to load the file directly from the .exe?

Code: Select all

F2::
deleteUnusedSwatches(*) {
	RunWait("Illustrator.exe " loadExtJava(resourceNumber/filePath), , "Max")
	return
}
The End.

Return to “Ask for Help (v2)”