trof Posted December 31, 2014 Share Posted December 31, 2014 Hi, Opt("ExpandVarStrings", 1) Opt("ExpandEnvStrings", 1) If $CmdLine[0] > 0 Then $tmp = "" For $i = 1 to $CmdLine[0] ;SPACE-delimited and QUOTED.. ; $tmp = $tmp & """" & FileGetLongName($CmdLine[$i]) & """ " ; ;CRLF-delimited.. $tmp = $tmp & FileGetLongName($CmdLine[$i]) & @CRLF Next ClipPut(StringTrimRight($tmp,1)) EndIf Local $bak = ClipGet() Run('"%APPDATA%\Free file wiper\Free_File_Wiper.exe"' & $bak) sleep (2000) If WinExists(" Free File Wiper", "Warning! After wiping, the file will be unrecoverable. Continue?") Then WinWaitClose(" Free File Wiper", "Warning! After wiping, the file will be unrecoverable. Continue?") Endif sleep (2000) If WinExists("Free File Wiper - wiping files") Then WinWaitClose("Free File Wiper - wiping files") Endif sleep (2000) if WinExists("Free File Wiper - Donate and register") Then sleep (11000) ControlClick("Free File Wiper - Donate and register", "", "[CLASS:WindowsForms10.STATIC.app.0.33c0d9d; INSTANCE:13]", "left", 1, 657, 21) Else exit Endif I'd like to build a script to be launched from "SendTo" menu and that invokes the program "Free File Wiper" to shred selected files. There are same errors in the script I wrote: 1) Run('"%APPDATA%\Free file wiper\Free_File_Wiper.exe"' & $bak) Files are not passed correctly to Free File Wiper. I have tried: Run('"%APPDATA%\Free file wiper\Free_File_Wiper.exe"' & $CmdLine[0]) $Var1 = $cmdline[0] run('"%APPDATA%\Free file wiper\Free_File_Wiper.exe"' & $var1 &'"') Run("%APPDATA%\Free file wiper\Free_File_Wiper.exe" & " %1") But they don't work 2) ControlClick("Free File Wiper - Donate and register", "", "[CLASS:WindowsForms10.STATIC.app.0.33c0d9d; INSTANCE:13]", "left", 1, 657, 21) Mouse doesn't move with this syntax Here the summary of Au3Info_x64 expandcollapse popup>>>> Window <<<< Title: Free File Wiper - Donate and register Class: WindowsForms10.Window.8.app.0.33c0d9d Position: 571, 242 Size: 777, 555 Style: 0x16CC0000 ExStyle: 0x00050100 Handle: 0x00000000000206BE >>>> Control <<<< Class: WindowsForms10.STATIC.app.0.33c0d9d Instance: 13 ClassnameNN: WindowsForms10.STATIC.app.0.33c0d9d13 Name: Label6 Advanced (Class): [NAME:Label6] ID: 67290 Text: Position: 3, 9 Size: 752, 110 ControlClick Coords: 657, 21 Style: 0x5600000D ExStyle: 0x00000000 Handle: 0x00000000000106DA >>>> Mouse <<<< Position: 1239, 302 Cursor ID: 0 Color: 0xF5F5F5 >>>> StatusBar <<<< >>>> ToolsBar <<<< >>>> Visible Text <<<< Register by DOWNLOADING License type: SIX MONTHS Register by DONATING License type: LIFETIME Skip donation Sponsor Register by DOWNLOADING License code Register Download license code (MAIN link) To register Free File Wiper simply download the license code. Download from MIRROR link Open PayPal in the webbrowser Register The registration code is valid for all our software! With only one donation you can register all our software! EMail used on PayPal PayPal transaction ID After registering, this window and the DONATE logo will never displayed anymore :) This software is donationware. You can use it for free! If you want to help us and support the development of this application, you can register it by donating or by downloading the license code. If you have already donated, insert the email used on PayPal and the transaction ID (it's in the confirmation email we have sent to you, if you don't have received it CHECK the spam folder!), then click on the button 'Register'. >>>> Hidden Text <<<< Link to comment Share on other sites More sharing options...
Developers Jos Posted December 31, 2014 Developers Share Posted December 31, 2014 1) There is no space between the programname and the parameter. 2) I don't have this program but doesn't it have commandline parameters to use it in batch in stead of trying to automate a window? Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
trof Posted December 31, 2014 Author Share Posted December 31, 2014 (edited) 1) How can add space between programname and parameter? I tried this with no luck Run('"%APPDATA%\Free file wiper\Free_File_Wiper.exe"' & $bak) 2) Unfortunately closing the last window of Free file wiper cannot be done with commandline parameters Edited December 31, 2014 by trof Link to comment Share on other sites More sharing options...
alienclone Posted December 31, 2014 Share Posted December 31, 2014 1) How can add space between programname and parameter? I tried this with no luck Run('"%APPDATA%\Free file wiper\Free_File_Wiper.exe"' & $bak) 2) Unfortunately closing the last window of Free file wiper cannot be done with commandline parameters Run('"%APPDATA%\Free file wiper\Free_File_Wiper.exe "' & $bak) If @error Then MsgBox(262192, "", @ComputerName & " slaps " & @UserName & " around a bit with a large trout!") EndIf "Yeah yeah yeah patience, how long will that take?" -Ed Gruberman REAL search results | SciTE4AutoIt3 Editor Full Version Link to comment Share on other sites More sharing options...
Developers Jos Posted December 31, 2014 Developers Share Posted December 31, 2014 (edited) Run('"%APPDATA%\Free file wiper\Free_File_Wiper.exe "' & $bak) Nah .....should add the space after the double quote like: Run('"%APPDATA%\Free file wiper\Free_File_Wiper.exe" ' & $bak) 2) Unfortunately closing the last window of Free file wiper cannot be done with commandline parameters Where are these commandline parameters listed? Jos Edited December 31, 2014 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
trof Posted December 31, 2014 Author Share Posted December 31, 2014 (edited) Run('"%APPDATA%Free file wiperFree_File_Wiper.exe" ' & $bak) This works great, thanks However I changed this line of the script to allow deletion of files whose name contain space If $CmdLine[0] > 0 Then $tmp = "" For $i = 1 to $CmdLine[0] ;SPACE-delimited and QUOTED.. $tmp = $tmp & """" & FileGetLongName($CmdLine[$i]) & """ " ; ;CRLF-delimited.. ; $tmp = $tmp & FileGetLongName($CmdLine[$i]) & @CRLF Next ClipPut(StringTrimRight($tmp,1)) EndIf Regarding mouse movement the problem persists Edited December 31, 2014 by trof Link to comment Share on other sites More sharing options...
Developers Jos Posted December 31, 2014 Developers Share Posted December 31, 2014 You didn't answer my second question... so let me ask you a different way: is this the program you use? It seems to have the "send to" option already. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
trof Posted December 31, 2014 Author Share Posted December 31, 2014 (edited) Yes, it is Free file wiper doesn't have commandline parameters. With this script I'd like to automatically close the nag screen that asks me to donate. That's why I need to move mouse pointer over the button Skip donation Edited December 31, 2014 by trof Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now