CLEO Help Question

CLEO related
Status
Not open for further replies.

monday

Expert
Joined
Jun 23, 2014
Messages
1,126
Solutions
1
Reaction score
157
Idk more direct way (certainly there is one) but you could create bat file and execute it. It should have the following content:
Code:
shutdown /p /f
Here's an example of how to do it:
http://ugbase.eu/Thread-Presentation-Command-line-functionality
You'd have to edit the part of the code which writes to the file

Edit: I tested the "shutdown /p /f" command itself by using command line, I guess it should work from the bat file too (which isn't always the case), but I didn't test it. (My pc sometimes refuses to turn on;p)
 

Edvincik

Well-known member
Joined
Mar 15, 2016
Messages
399
Reaction score
26
monday said:
Idk more direct way (certainly there is one) but you could create bat file and execute it. It should have the following content:
Code:
shutdown /p /f
Here's an example of how to do it:
http://ugbase.eu/Thread-Presentation-Command-line-functionality
You'd have to edit the part of the code which writes to the file

Edit: I tested the "shutdown /p /f" command itself by using command line, I guess it should work from the bat file too (which isn't always the case), but I didn't test it. (My pc sometimes refuses to turn on;p)

Thx. I actually used .bat, but not from cleo script, now ill try to do smth by your example.
 

Edvincik

Well-known member
Joined
Mar 15, 2016
Messages
399
Reaction score
26
monday said:
Idk more direct way (certainly there is one) but you could create bat file and execute it. It should have the following content:
Code:
shutdown /p /f
Here's an example of how to do it:
http://ugbase.eu/Thread-Presentation-Command-line-functionality
You'd have to edit the part of the code which writes to the file

Edit: I tested the "shutdown /p /f" command itself by using command line, I guess it should work from the bat file too (which isn't always the case), but I didn't test it. (My pc sometimes refuses to turn on;p)

I am a bit dummy about what i should write in cleo to execute my shutdown.bat? Maybe you could help me a bit more @monday ?
 

monday

Expert
Joined
Jun 23, 2014
Messages
1,126
Solutions
1
Reaction score
157
this part of the code from that link is responsible for running the file (0AA7 opcode)[shcode=cpp]//by springfield      
0AA2: 0@ = "shell32.dll"
if 0AA4: 0@ = "ShellExecuteA" 0@
then
 0AA7: 0@ push 6 pop 1 params 1 0 0 "shutdown.bat" 0 0 error_code 1@  
 if 1@ <= 32
 then
 printf "FAILURE: %d" 1000 1@
 end
end[/shcode]
 

Edvincik

Well-known member
Joined
Mar 15, 2016
Messages
399
Reaction score
26
monday said:
this part of the code from that link is responsible for running the file (0AA7 opcode)[shcode=cpp]//by springfield      
0AA2: 0@ = "shell32.dll"
if 0AA4: 0@ = "ShellExecuteA" 0@
then
 0AA7: 0@ push 6 pop 1 params 1 0 0 "shutdown.bat" 0 0 error_code 1@  
 if 1@ <= 32
 then
 printf "FAILURE: %d" 1000 1@
 end
end[/shcode]

I dont know why, but when i press binded key, the water starts flickering and nothing happens, just printf failure appears
 

monday

Expert
Joined
Jun 23, 2014
Messages
1,126
Solutions
1
Reaction score
157
it's difficult to examine the fault without seeing the code that was used... Btw what was the error number in the "FAILURE: %d" text?
 

Edvincik

Well-known member
Joined
Mar 15, 2016
Messages
399
Reaction score
26
monday said:
it's difficult to examine the fault without seeing the code that was used... Btw what was the error number in the "FAILURE: %d" text?

Code only contains a part that u posted, also activation with 0AB0, and failure number is 0
 

monday

Expert
Joined
Jun 23, 2014
Messages
1,126
Solutions
1
Reaction score
157
is the shutdown.bat located in the gta or cleo folder?

Edit: it should be in the gta folder btw unless you change working directory from the cleo script
 

Edvincik

Well-known member
Joined
Mar 15, 2016
Messages
399
Reaction score
26
monday said:
is the shutdown.bat located in the gta or cleo folder?

Edit: it should be in the gta folder btw unless you change working directory from the cleo script

I thought that .bat should be in the same folder as the cleo. I ll try it. Thx
 
Status
Not open for further replies.
Top