Sign in to follow this  
Followers 0
trof

Script from Sendto menu

8 posts in this topic

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
 
 
>>>> 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 <<<<
 
 

Share this post


Link to post
Share on other sites



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


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#3 ·  Posted (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 by trof

Share this post


Link to post
Share on other sites

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

>Exit code: 0

REAL search results

"Yeah yeah yeah, patience. How long will that take?"  -Ed Gruberman

Share this post


Link to post
Share on other sites

#5 ·  Posted (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 by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#6 ·  Posted (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 by trof

Share this post


Link to post
Share on other sites

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


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#8 ·  Posted (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 by trof

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0