Technical support and scripting issues
Moderators: JRL, Dorian (MJT support)
-
dwayneosmith
- Newbie
- Posts: 3
- Joined: Sat Jan 08, 2022 6:09 am
Post
by dwayneosmith » Sat Jan 08, 2022 10:11 am
I want to include a javascript file in the project. Everything works fine but this script file does not work. I'm executing following code:
-
dwayneosmith
- Newbie
- Posts: 3
- Joined: Sat Jan 08, 2022 6:09 am
Post
by dwayneosmith » Sun Jan 09, 2022 6:12 am
Yes, I saw this earlier before starting this thread. Initially, I tried the run command but then I decided to use the executefile command.
-
JRL
- Automation Wizard
- Posts: 3529
- Joined: Mon Jan 10, 2005 6:22 pm
- Location: Iowa
Post
by JRL » Tue Jan 11, 2022 2:06 pm
I have no idea how to make your java script run within Macro Scheduler. I'm also unsure what all you are looking to accomplish but hex and octal and decimal and ansi conversion examples are all over the internet in vbscript. Vbscript, of course, runs natively in Macro Scheduler I've had this one for about twenty years, no idea where I got it or if I wrote it myself. I modified it a bit this morning to make it convert the octet string on the website you posted into a readable word. It should be able to convert any space delimited string of octets into their ansi character counterparts.
Code: Select all
Let>bList=01000011 01101111 01101110 01110110 01100101 01110010 01110100
Separate>blist,space,vBin
Let>kk=0
Let>vWord=
Repeat>kk
Add>kk,1
Let>Binary=vBin_%kk%
Let>DecNum=0
Let>BitCount=0
While>{%BitCount%<Length(%Binary%)}
Let>BitCount=BitCount+1
VBEval>%DecNum% + (Cint(Mid("%Binary%",Len("%Binary%")-%BitCount%+1,1)) * (2 ^ (%BitCount% - 1))),DecNum
EndWhile
VBEval>chr(%DecNum%),vTemp
Let>vWord=%vWord%%vTemp%
Until>kk=vBin_Count
MDL>vWord