run dos bat file or cmd line (os shell) from auggie script

Post a reply

Confirmation code
Enter the code exactly as it appears. All letters are case insensitive.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :arrow: :| :mrgreen: :geek: :ugeek:

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: run dos bat file or cmd line (os shell) from auggie script

Re: run dos bat file or cmd line (os shell) from auggie script

by Richard Cullin » Mon Sep 23, 2019 9:35 pm


thanks , works perfectly when executable is in the system PATH

I can now send this json udp packet to my sonoff switch and turn the exhaust duct fan on/off for the laser fume extractor
from the auggie console 

Code: Select all

 global	AirButton = function()
{ 
print("airblow toggle"); 
system.Exec("sfk udpsend sonoff5:9889 {\"switch\":2}" );
    yield(); 
return;
};

Re: run dos bat file or cmd line (os shell) from auggie script

by Richard Cullin » Mon Sep 23, 2019 3:03 pm

system.Exec("Notepad "

notepad works ok. but not my wget.exe ,  i will try locating it in the "PATH"
in the morning , its late here pumpkins everywhere

Re: run dos bat file or cmd line (os shell) from auggie script

by ArtF » Mon Sep 23, 2019 1:17 pm

YaNvrNo:

  Good thing you remembered that, I knew there was something we added but couldnt
quite remember what.. :)

Art

Re: run dos bat file or cmd line (os shell) from auggie script

by Amazon [Bot] » Mon Sep 23, 2019 12:52 pm

found some examples:
system.Exec(path+file);
system.Exec("Notepad " + path + file);

try this:
system.Exec("c:\ctwin\s5.bat");

Re: run dos bat file or cmd line (os shell) from auggie script

by Richard Cullin » Mon Sep 23, 2019 5:52 am

tried Exec, Execute , got nothing except the print message

Code: Select all

 
global	AirButton = function()
{
 
 
print("airblow toggle"); 
Exec("c:\ctwin\s5.bat");
    yield();
 
return;
};
 

run dos bat file or cmd line (os shell) from auggie script

by Richard Cullin » Mon Sep 23, 2019 2:28 am

i have been playing around reprogramming sonoff  wifi switches to operate at my beck and call. it occurred to me that it would be a nice way to control
pumps, compressors exhaust fans  etc from auggie without the need for any physical connection.
i can use the command line utility wget.exe
{wget "http://10.0.0.131/st?sw=4" } to send a command to the sonoff

can auggie script run an os shell ?



Top