cappy0815 Posted December 7, 2020 Share Posted December 7, 2020 Hi all, I was using a script at windows 7 to find and mark a file in windows explorer. After changing to windows 10 it is no longer working correctly. This is my code Func _find() $file2open = GUICtrlRead ( $input_beleg ) $fileformat = StringReplace ( $file2open, "/", "_" ) Run ( "explorer.exe /e,S:\XYZ\Auftragsabwicklung\_Belege") sleep (500) send ( "^f" ) ConsoleWrite ($fileformat) send ( $fileformat ) IniWrite ( $historyfile, "history", "last", $file2open ) if $config[2][1] = "1" Then ConsoleWrite ( "exit" ) Exit EndIf EndFunc explorer opens as desired. Search field is selected but only the LAST string is displayed and searched. Background: I need the small tool to search a file, mark it, and drop it to an email. Thanks for ur help Cappy Link to comment Share on other sites More sharing options...
GokAy Posted December 7, 2020 Share Posted December 7, 2020 Hey, not sure if relevant but tried surrounding the file path string ($file2open) with double quotes? Link to comment Share on other sites More sharing options...
cappy0815 Posted December 7, 2020 Author Share Posted December 7, 2020 Thanks ... $file2open is a variable and does not need "" I just found a solution using ... ShellExecute ( @WindowsDir & '\explorer.exe', "/select, S:\path" & $fileformat & ".pdf") Works perfect ... 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