svenjatzu Posted April 19, 2019 Share Posted April 19, 2019 Hey, im looking for a way to execute files automatically when i copy them do the desktop. Someone knows how this can be solved? I thought about creating an .exe with winrar and adding an .ini file to the archive to my autoit.exe so that it could run like an autorun.ini on usb sticks but i guess this wont work. Hope someone got an idea : ) Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted April 19, 2019 Moderators Share Posted April 19, 2019 Moved to the appropriate forum. Moderation Team Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Deye Posted April 19, 2019 Share Posted April 19, 2019 (edited) Not an auto-run example but perhaps a head start idea to incorporate .. #include <File.au3> Global $sd = ObjCreate("Scripting.Dictionary"), $array = _FileListToArrayRec(@DesktopDir, "*") ; array snapshot the list of files in the desktop folder For $i = 1 To UBound($array) - 1 $sd.Item($array[$i]) = 1 Next HotKeySet("{ESC}", "Terminate") ; Exit HotKeySet("^e", "Run_Display") ; ctrl + e While 1 Sleep(2000) WEnd Func Run_Display() Local $a = _FileListToArrayRec(@DesktopDir, "*"), $sdTmp = ObjCreate("Scripting.Dictionary") For $i = 1 To UBound($a) - 1 If $sd.Exists($a[$i]) Then ContinueLoop ;add any new files to $sdTmp array $sdTmp.Item($a[$i]) = @DesktopDir & "\" & $a[$i] Next $array = $a ; update main snapshot $a = $sdTmp.Items _ArrayDisplay($a) ; process new files .. EndFunc ;==>Run_Display Func Terminate() Exit EndFunc ;==>Terminate Deye Edited April 19, 2019 by Deye typo Link to comment Share on other sites More sharing options...
svenjatzu Posted April 20, 2019 Author Share Posted April 20, 2019 Thanks : ) But im not shure if thats what im looking for. what i need is that the file autmatically executes when i paste it to another folder. Just like i copy it from my pc and past it to another pc, in the moment when its copied to the other pc it should execute without that i need to run it on my own Link to comment Share on other sites More sharing options...
Deye Posted April 20, 2019 Share Posted April 20, 2019 svenjatzu, its possible to make it work but its really up to you make it, Maybe simpler to walk the process through starting with FileOpenDialog() .. if you already have any code for this and still cant make it work then post it here to get more help Deye Link to comment Share on other sites More sharing options...
svenjatzu Posted April 20, 2019 Author Share Posted April 20, 2019 Hey Deye, thanks for your replay, my code is verry simple, #include <MsgBoxConstants.au3> Local $sFilePath1 = RegRead("HKEY_CURRENT_USER\Software\JavaSoft\Prefs\elo\clients\hardware", "Code") Local $sFilePath = RegRead("HKEY_CURRENT_USER\Software\JavaSoft\Prefs\elo\clients\hardware", "Ticket") MsgBox($MB_SYSTEMMODAL, "", "Der letzte Wettschein lautet: " & $sFilePath & " $ " & $sFilePath1) 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