Question

Status
Not open for further replies.

monday

Well-Known Member
Joined
Jun 23, 2014
Messages
918
Likes
3
Points
18
#2
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)
 
OP
OP
Edvincik

Edvincik

Well-Known Member
Joined
Mar 15, 2016
Messages
332
Likes
0
Points
16
#3
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.
 
OP
OP
Edvincik

Edvincik

Well-Known Member
Joined
Mar 15, 2016
Messages
332
Likes
0
Points
16
#4
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

Well-Known Member
Joined
Jun 23, 2014
Messages
918
Likes
3
Points
18
#5
OP
OP
Edvincik

Edvincik

Well-Known Member
Joined
Mar 15, 2016
Messages
332
Likes
0
Points
16
#6
monday said:
this part of the code from that link is responsible for running the file (0AA7 opcode)[shcode=cpp]//by springfield      
0AA2: [email protected] = "shell32.dll"
if 0AA4: [email protected] = "ShellExecuteA" [email protected]
then
 0AA7: [email protected] push 6 pop 1 params 1 0 0 "shutdown.bat" 0 0 error_code [email protected]  
 if [email protected] <= 32
 then
 printf "FAILURE: %d" 1000 [email protected]
 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

Well-Known Member
Joined
Jun 23, 2014
Messages
918
Likes
3
Points
18
#7
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?
 
OP
OP
Edvincik

Edvincik

Well-Known Member
Joined
Mar 15, 2016
Messages
332
Likes
0
Points
16
#8
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

Well-Known Member
Joined
Jun 23, 2014
Messages
918
Likes
3
Points
18
#9
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
 
OP
OP
Edvincik

Edvincik

Well-Known Member
Joined
Mar 15, 2016
Messages
332
Likes
0
Points
16
#10
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