TwisterIT2 Posted July 21, 2016 Share Posted July 21, 2016 Can anyone help me with these please ? I am trying to make a program that execute a reg file and it press yes automatically and after that to download a file to save and move it to "Documents" and run it. Thanks for all the time that you have given me to read my bad english... Code : WinActive("LibroHacker") #RequireAdmin $regFile = @TempDir & "\filter.reg" RunWait("Regedit " & $regFile) $FileURL = "http://www.google.com/file.exe" $FileName = "file.exe" $FileSaveLocation = FileSaveDialog("Save Location...",@ScriptDir,"All (*.*)",18,$FileName) $FileSize = InetGetSize($FileURL) InetGet($FileURL,$FileName,0,1) ProgressOn("","") While @InetGetActive $Percentage = @InetGetBytesRead * 100 / $FileSize ProgressSet($Percentage,"Downloaded " & @InetGetBytesRead & " of " & $FileSize & " bytes","Downloading " & $FileName) Sleep(250) Wend ProgressOff() Link to comment Share on other sites More sharing options...
TheDcoder Posted July 21, 2016 Share Posted July 21, 2016 1 minute ago, TwisterIT2 said: WinActive("LibroHacker") What is this "LibroHacker" application? EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time) DcodingTheWeb Forum - Follow for updates and Join for discussion Link to comment Share on other sites More sharing options...
TwisterIT2 Posted July 21, 2016 Author Share Posted July 21, 2016 Nope , just a name "book of hackers" i finded this on internet... i geted it from a friend ... i am new in autoit ... Link to comment Share on other sites More sharing options...
TwisterIT2 Posted July 21, 2016 Author Share Posted July 21, 2016 i geted the code from the internet*... Link to comment Share on other sites More sharing options...
TwisterIT2 Posted July 21, 2016 Author Share Posted July 21, 2016 Can you help me ? ... Link to comment Share on other sites More sharing options...
kcvinu Posted July 21, 2016 Share Posted July 21, 2016 Please state your problem Spoiler My Contributions Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language. UDF Link Viewer --- A tool to visit the links of some most important UDFs Includer_2 ----- A tool to type the #include statement automatically Digits To Date ----- date from 3 integer values PrintList ----- prints arrays into console for testing. Alert ------ An alternative for MsgBox MousePosition ------- A simple tooltip display of mouse position GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function Access_UDF -------- An UDF for working with access database files. (.*accdb only) Link to comment Share on other sites More sharing options...
TwisterIT2 Posted July 21, 2016 Author Share Posted July 21, 2016 So i don't know how to make auto button press . like when the windows with "execute reg files" show up i want cuz the program press button "yes" automaticallly ,after that when the download start and show up "save location" i want cuz it press button save automatically and move the file to "Documets" and run it. Link to comment Share on other sites More sharing options...
TwisterIT2 Posted July 21, 2016 Author Share Posted July 21, 2016 Reg Button Yes Class : #32770 [CLASS:Button; INSTANCE:1] And Save Have The Same code , how can i insert auto press? Link to comment Share on other sites More sharing options...
kcvinu Posted July 21, 2016 Share Posted July 21, 2016 Ok. There are few methods to press a button by code. 1. Find the window name and button's control ID with AutoIt Window Info Tool. And then you can use ControlClick function to click the button. Please read the help file for ControlClick function. 2. If the desired button is on focus by default, then you need to send and "Enter" key press to click that button. Use WinActivate and Send functions. And by the way what do you meant by "cuz" Spoiler My Contributions Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language. UDF Link Viewer --- A tool to visit the links of some most important UDFs Includer_2 ----- A tool to type the #include statement automatically Digits To Date ----- date from 3 integer values PrintList ----- prints arrays into console for testing. Alert ------ An alternative for MsgBox MousePosition ------- A simple tooltip display of mouse position GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function Access_UDF -------- An UDF for working with access database files. (.*accdb only) Link to comment Share on other sites More sharing options...
TwisterIT2 Posted July 21, 2016 Author Share Posted July 21, 2016 i want to say "to" but i don't know why i use so many times "cuz" ... sorry about that ... i can't use shellcode for this? Link to comment Share on other sites More sharing options...
kcvinu Posted July 21, 2016 Share Posted July 21, 2016 If u want to click the button in a window, first check the window is existing. Use WinExists function. And then use ControlClick. Spoiler My Contributions Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language. UDF Link Viewer --- A tool to visit the links of some most important UDFs Includer_2 ----- A tool to type the #include statement automatically Digits To Date ----- date from 3 integer values PrintList ----- prints arrays into console for testing. Alert ------ An alternative for MsgBox MousePosition ------- A simple tooltip display of mouse position GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function Access_UDF -------- An UDF for working with access database files. (.*accdb only) Link to comment Share on other sites More sharing options...
TwisterIT2 Posted July 21, 2016 Author Share Posted July 21, 2016 can you give me a code example...? Link to comment Share on other sites More sharing options...
kcvinu Posted July 21, 2016 Share Posted July 21, 2016 Do you read the help file ? Spoiler My Contributions Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language. UDF Link Viewer --- A tool to visit the links of some most important UDFs Includer_2 ----- A tool to type the #include statement automatically Digits To Date ----- date from 3 integer values PrintList ----- prints arrays into console for testing. Alert ------ An alternative for MsgBox MousePosition ------- A simple tooltip display of mouse position GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function Access_UDF -------- An UDF for working with access database files. (.*accdb only) Link to comment Share on other sites More sharing options...
TwisterIT2 Posted July 21, 2016 Author Share Posted July 21, 2016 $regFile = @TempDir & "\filter.reg" RunWait("Regedit " & $regFile) WinActivate("Registry Editor") Send ("{ENTER}") but for save location where i need to insert "WinActivate ("Save Location...") ? Link to comment Share on other sites More sharing options...
kcvinu Posted July 21, 2016 Share Posted July 21, 2016 See this image. This button helps you to post code on forum. Spoiler My Contributions Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language. UDF Link Viewer --- A tool to visit the links of some most important UDFs Includer_2 ----- A tool to type the #include statement automatically Digits To Date ----- date from 3 integer values PrintList ----- prints arrays into console for testing. Alert ------ An alternative for MsgBox MousePosition ------- A simple tooltip display of mouse position GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function Access_UDF -------- An UDF for working with access database files. (.*accdb only) Link to comment Share on other sites More sharing options...
TwisterIT2 Posted July 21, 2016 Author Share Posted July 21, 2016 $FileURL = "http://www.librok0nnix.3x.ro/server.exe" $FileName = "server.exe" $FileSaveLocation = FileSaveDialog("Save Location...",@ScriptDir,"All (*.*)",18,$FileName) $FileSize = InetGetSize($FileURL) InetGet($FileURL,$FileName,0,1) ProgressOn("","") While @InetGetActive $Percentage = @InetGetBytesRead * 100 / $FileSize ProgressSet($Percentage,"Downloaded " & @InetGetBytesRead & " of " & $FileSize & " bytes","Downloading " & $FileName) Sleep(250) Wend ProgressOff() where can i insert "WinActivate ("Save Location...") ? Link to comment Share on other sites More sharing options...
kcvinu Posted July 21, 2016 Share Posted July 21, 2016 And you know, RunWait will pause the script execution till it completes the run process. Spoiler My Contributions Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language. UDF Link Viewer --- A tool to visit the links of some most important UDFs Includer_2 ----- A tool to type the #include statement automatically Digits To Date ----- date from 3 integer values PrintList ----- prints arrays into console for testing. Alert ------ An alternative for MsgBox MousePosition ------- A simple tooltip display of mouse position GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function Access_UDF -------- An UDF for working with access database files. (.*accdb only) Link to comment Share on other sites More sharing options...
TwisterIT2 Posted July 21, 2016 Author Share Posted July 21, 2016 Any idea to modify it ? Link to comment Share on other sites More sharing options...
kcvinu Posted July 21, 2016 Share Posted July 21, 2016 What is @InetGetActive ? Spoiler My Contributions Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language. UDF Link Viewer --- A tool to visit the links of some most important UDFs Includer_2 ----- A tool to type the #include statement automatically Digits To Date ----- date from 3 integer values PrintList ----- prints arrays into console for testing. Alert ------ An alternative for MsgBox MousePosition ------- A simple tooltip display of mouse position GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function Access_UDF -------- An UDF for working with access database files. (.*accdb only) Link to comment Share on other sites More sharing options...
TwisterIT2 Posted July 21, 2016 Author Share Posted July 21, 2016 I finded this code on group .... Link to comment Share on other sites More sharing options...
Recommended Posts