guinness Posted January 2, 2013 Author Share Posted January 2, 2013 You can also use this >> $sFileList = _WM_COPYDATA_SendShutdown() If $sFileList Then $sFileList = StringStripWS($sFileList, 3) & @CRLF ; Strip trailing whitespace. Local $aArray = StringSplit($sFileList, @CRLF) _ArrayDisplay($aArray) EndIf $sFileList = '' UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
guinness Posted January 2, 2013 Author Share Posted January 2, 2013 (edited) Updated post #25 again with improvements in waiting for all instances to close. Edit: Let me know if you want it to return an array instead. Edited January 2, 2013 by guinness UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
telmob Posted January 2, 2013 Share Posted January 2, 2013 I think my computer is to fast I added the regwrite just to test, like this: If $sFileList Then $sFileList = StringStripWS($sFileList, 3) & @CRLF; Strip trailing whitespace. ControlSetText($hWnd, '', 'Edit1', ControlGetText($hWnd, '', 'Edit1') & $sFileList) RegWrite( 'HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun',$sFileList, "REG_SZ", $sFileList) EndIf And i got some several paths in the same line in the registry, like this: C:\Users\Telmo\Desktop\AU3 TESTS\shellall test.au3 C:\Users\Telmo\Desktop\AU3 TESTS\shellall test.exeC:\Users\Telmo\Desktop\AU3 TESTS\sdf.au3 C:\Users\Telmo\Desktop\AU3 TESTS\popup.au3C:\Users\Telmo\Desktop\AU3 TESTS\WM_COPYDATA.au3 C:\Users\Telmo\Desktop\AU3 TESTS\shellall test.exe I know this isn't your script fault, but still i wonder... what am i doing wrong?? Link to comment Share on other sites More sharing options...
guinness Posted January 2, 2013 Author Share Posted January 2, 2013 (edited) Well I did mention about StringStripWS, but you're stripping the last @CRLF. Anyway, try this version, it uses an array >> Edited January 2, 2013 by guinness UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
telmob Posted January 2, 2013 Share Posted January 2, 2013 (edited) LOL! Now its not writing to the registry. I think i messed up. But the spaces in notepad are completely gone. Your script is really cool. Maybe one day i can understand it completely Edit: I also lost the first example you posted before in post #25. I don't have a clue why its not writing in registry. Edited January 2, 2013 by telmob Link to comment Share on other sites More sharing options...
guinness Posted January 2, 2013 Author Share Posted January 2, 2013 The example in post 25 is still there. Also it's probably the input into that registry key would probably be your issue. But as far as i'm concerned, I have assisted you enough in your goal. I would look at the code and really break it down to see what i'm doing, there is a lot to be learnt there. UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
telmob Posted January 2, 2013 Share Posted January 2, 2013 (edited) But as far as i'm concerned, I have assisted you enough in your goal.Absolutely, and your help has been precious.I would look at the code and really break it down to see what i'm doing, there is a lot to be learnt there.That's what i'm doing right now.I'll post something here when i figure it out. Edit: Wanna laugh? I tested the script by adding the exe file to the registry. But it was added to DisallowRun, which means, it cannot work properly Still fixing my @CRLF Edited January 2, 2013 by telmob Link to comment Share on other sites More sharing options...
guinness Posted January 2, 2013 Author Share Posted January 2, 2013 (edited) Did you try the version in post #44? It now returns an array when passing a parameter to _WM_COPYDATA_SendShutdown, just like in the Array functions. Plus, I did say it's the way you're writing to the registry key, this took me 5 seconds to google >> http://www.sevenforums.com/tutorials/80605-applications-prevent-running-specified-programs.html Edit: I also updated the post #25 version. Edited January 2, 2013 by guinness UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
telmob Posted January 2, 2013 Share Posted January 2, 2013 (edited) Yes, i tried it. I've even tried arraytostring to write it to the registry (without luck). But i have two problems here. In that specific key of the registry i can only have file names without their paths, which this should take care of: StringRegExpReplace($sFileList, "^.*\\", "") ...but it only works in the first file. And i still can't find a way to separate the paths line. They're still all together like C:filepathfile.exeC:filepathfilename2.exe. I could do a arraytostring to write everything to a ini file (or even use ControlSetText), then perform a stringregexp to remove the paths through out the lines and finally write them to registry, but it doesn't look clean. Edited January 2, 2013 by telmob Link to comment Share on other sites More sharing options...
guinness Posted January 2, 2013 Author Share Posted January 2, 2013 Again, did you see my last update in post #44? It returns an array so you just have to enumerate through the array, therefore there shouldn't be any issue(s) with files joining. Plus, I can't stress this enough, you're adding it wrong to the registry. Give me 30 minutes and I will show you the correct approach. UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
guinness Posted January 2, 2013 Author Share Posted January 2, 2013 (edited) I have no clue why adding the file name to HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionPoliciesExplorerDisallowRun isn't working, but this is how it should be. Good luck. You now have everything in your arsenal to continue without me. expandcollapse popup#RequireAdmin #NoTrayIcon #include <Array.au3> #include <GUIConstantsEx.au3> #include '_ShellAll.au3' ; Download From: http://www.autoitscript.com/forum/topic/133942-shellall-create-an-entry-in-the-shell-contextmenu-when-selecting-a-file-and-folder-includes-the-program-icon-as-well/#entry933527 #include 'WM_COPYDATA.au3' ; http://www.autoitscript.com/forum/topic/119502-solved-wm-copydata-x64-issue If @Compiled Then Example() EndIf Func Example() Local $iFileSent = _WM_COPYDATA_Initial('UniqueIDString', Default) ; Start the communication process. If @error Then If Not _WM_COPYDATA_SendStart(StringReplace(StringStripWS($CmdLineRaw, 3), '"', '')) Then ; Send $CmdLineRaw if there is process already running. MsgBox(4096, '2nd Instance: ' & @error, 'Seems there was an @error, but more than likely $CmdLineRaw was blank.' & @CRLF & @CRLF & $CmdLineRaw) EndIf Exit EndIf Local $iPID = Run('notepad.exe', @ScriptDir, @SW_SHOW) Local $hWnd = WinWait('[CLASS:Notepad]', '', 5) If Not $hWnd Then Return False EndIf WinSetTitle($hWnd, '', 'Example by guinness ' & @YEAR) Local $aFileList = 0, $sFileList = '' If $CmdLine[0] Then For $i = 1 To $CmdLine[0] $sFileList &= $CmdLine[$i] & @CRLF Next ControlSetText($hWnd, '', 'Edit1', $sFileList) $sFileList = '' EndIf _ShellAll_Install('Start Example') ; Add the running EXE to the Shell ContextMenu. This will only display when selecting a file and folder. While ProcessExists($iPID) Switch GUIGetMsg() Case $iFileSent ; If the WM_COPYDATA message is interecepted then add the data sent to notepad. $sFileList = _WM_COPYDATA_SendShutdown($aFileList) If $sFileList Then $sFileList = StringStripWS($sFileList, 3) & @CRLF ; Strip trailing whitespace. ControlSetText($hWnd, '', 'Edit1', ControlGetText($hWnd, '', 'Edit1') & $sFileList) $sFileList = _AddToDisallow($aFileList) _ArrayDisplay($aFileList, $sFileList) EndIf $aFileList = 0 $sFileList = '' EndSwitch WEnd _DeleteToDisallow() _ShellAll_Uninstall() ; Remove the running EXE from the Shell ContextMenu. _WM_COPYDATA_Shutdown() Return True EndFunc ;==>Example Func _AddToDisallow(ByRef $aArray) Local $fDisallow = Number(RegRead('HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\', 'DisallowRun')) == 1 If Not $fDisallow Then RegWrite('HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\', 'DisallowRun', 'REG_DWORD', 1) EndIf Local $iCount = 0, $iReturn = 0 For $i = 1 To $aArray[0] If StringTrimLeft($aArray[$i], StringInStr($aArray[$i], '.exe', 2, -1)) = 'exe' Then ; If the file is an exe, then continue. $aArray[$i] = _GetFilename($aArray[$i]) $iCount += 1 $iReturn += RegWrite('HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun\', String($i), 'REG_SZ', $aArray[$i]) EndIf Next If $iReturn = 0 And $iReturn = 0 Then Return False EndIf Return $iCount == $iReturn EndFunc ;==>_AddToDisallow Func _DeleteToDisallow() Local $iReturn = RegDelete('HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\', 'DisallowRun') $iReturn += RegDelete('HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun\') Return $iReturn == 2 EndFunc ;==>_DeleteToDisallow Func _GetFilename($sFileName) Return StringRegExpReplace($sFileName, '^.*\\', '') EndFunc ;==>_GetFilename Func _WM_COPYDATA_Initial($sIDString, $hGUI, $fCheckOnly = Default) _WM_COPYDATA_SetID($sIDString) Local Const $vReturn = _WM_COPYDATA_Start($hGUI, $fCheckOnly) Local Const $iError = @error Local $hWnd = WinGetHandle('[REGEXPTITLE:(?m)^' & _WM_COPYDATA_GetID() & '$]') $hWnd = HWnd(ControlGetText($hWnd, '', ControlGetHandle($hWnd, '', 'Edit1'))) _WM_COPYDATA_SetGUI($hWnd) WinSetTitle($hWnd, '', 'START_PROCESS') Return SetError($iError, 0, $vReturn) EndFunc ;==>_WM_COPYDATA_Initial Func _WM_COPYDATA_SendShutdown(ByRef $aArray) If StringStripWS(_WM_COPYDATA_GetData(), 8) <> 'START_PROCESS' Then Return SetError(1, 0, '') EndIf Local $aReturn[1] = [0], $aWinList = 0, $sData = '', $sReturn = '' Do $aWinList = WinList('[REGEXPTITLE:' & _WM_COPYDATA_GetID() & '__CHILD__' & '\d+]') If @error Then ExitLoop EndIf If $aWinList[0][0] Then ReDim $aReturn[($aReturn[0] + 1) + $aWinList[0][0]] For $i = 1 To $aWinList[0][0] $sData = ControlGetText($aWinList[$i][1], '', ControlGetHandle($aWinList[$i][1], '', 'Edit1')) If StringStripWS($sData, 8) Then $aReturn[0] += 1 $aReturn[$aReturn[0]] = $sData $sReturn &= $sData & @CRLF EndIf ControlSetText($aWinList[$i][1], '', ControlGetHandle($aWinList[$i][1], '', 'Edit1'), '') Next EndIf Until $aWinList[0][0] == 0 ReDim $aReturn[($aReturn[0] + 1)] $aArray = $aReturn $aReturn = 0 WinSetTitle(_WM_COPYDATA_GetGUI(), '', 'START_PROCESS') Return $sReturn EndFunc ;==>_WM_COPYDATA_SendShutdown Func _WM_COPYDATA_SendStart($sData) Local Const $sTitle = _WM_COPYDATA_GetID() & '__CHILD__' & @AutoItPID AutoItWinSetTitle($sTitle) Local Const $hWait = WinGetHandle($sTitle) If @error Then Return SetError(1, 0, False) EndIf ControlSetText($hWait, '', ControlGetHandle($hWait, '', 'Edit1'), $sData) If WinGetTitle(_WM_COPYDATA_GetGUI()) = 'START_PROCESS' Then If _WM_COPYDATA_Send('START_PROCESS') Then WinSetTitle(_WM_COPYDATA_GetGUI(), '', 'IN_PROCESS') EndIf EndIf While 1 If StringStripWS(ControlGetText($hWait, '', ControlGetHandle($hWait, '', 'Edit1')), 8) == '' Then ExitLoop EndIf Sleep(250) WEnd Return True EndFunc ;==>_WM_COPYDATA_SendStart Edited January 2, 2013 by guinness UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
guinness Posted January 2, 2013 Author Share Posted January 2, 2013 My suggestion is ask in the general help support section as to why 'HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionPoliciesExplorerDisallowRun' can't be written to. Create a very small reproducer to explain your case. UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
telmob Posted January 2, 2013 Share Posted January 2, 2013 (edited) Again... thank you for your reply. I've been trying to figure this out.'HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionPoliciesExplorerDisallowRun' can be writen to.See here:RegWrite('HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun\', "KEY", 'REG_SZ', "KEY")Its something in the script. The first script you posted writes to the registry if i use this:If $sFileList Then $sFileList = StringStripWS($sFileList, 3) & @CRLF; Strip trailing whitespace. ControlSetText($hWnd, '', 'Edit1', ControlGetText($hWnd, '', 'Edit1') & $sFileList) RegWrite( 'HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun',$sFileList, "REG_SZ", $sFileList) EndIfBut the problem is the glued paths names. It works well for one file only. And the stringregexp only works for the first file.Its really weird. I'm bashing my head on every wall in my house over this and i can't find where the problem lies. Edited January 2, 2013 by telmob Link to comment Share on other sites More sharing options...
guinness Posted January 2, 2013 Author Share Posted January 2, 2013 (edited) I know the feeling, you're writing a @CRLF delimited list to the registry, when I've told you that's not how the registry key works. Post #51 is what you want. All you need to do is work out why...RegWrite('HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun\', '1', 'REG_SZ', 'example.exe') RegWrite('HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun\', '2', 'REG_SZ', 'example_2.exe')isn't working. This is where you should do some research. I will even help you and provide a small reproducer I said you should create.expandcollapse popupLocal $fDisallow = Number(RegRead('HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\', 'DisallowRun')) == 1 If Not $fDisallow Then RegWrite('HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\', 'DisallowRun', 'REG_DWORD', 1) EndIf RegWrite('HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun\', '1', 'REG_SZ', 'example.exe') RegWrite('HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun\', '2', 'REG_SZ', 'example_2.exe') _RegJump('HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\') MsgBox(4096, '', 'Close, once you''ve checked the registry.') If Not $fDisallow Then RegDelete('HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\', 'DisallowRun') RegDelete('HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun\') Else RegDelete('HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun\', '1') RegDelete('HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun\', '2') EndIf Func _RegJump($sRegistryKey) ; By Yashied Local $aArray = StringSplit($sRegistryKey, '\', 2), $iResult = 1, $sClass = '[CLASS:RegEdit_RegEdit]', $sPrevious, $sRootKey If IsArray($aArray) Then $aArray = $aArray[0] Else $aArray = $sRegistryKey EndIf Switch $aArray Case 'HKEY_CLASSES_ROOT', 'HKEY_CURRENT_USER', 'HKEY_LOCAL_MACHINE', 'HKEY_USERS', 'HKEY_CURRENT_CONFIG' $sRootKey = $aArray Case 'HKCR' $sRootKey = 'HKEY_CLASSES_ROOT' Case 'HKCU' $sRootKey = 'HKEY_CURRENT_USER' Case 'HKLM' $sRootKey = 'HKEY_LOCAL_MACHINE' Case 'HKU' $sRootKey = 'HKEY_USERS' Case 'HKCC' $sRootKey = 'HKEY_CURRENT_CONFIG' Case Else Return 0 EndSwitch If WinExists($sClass) Then WinClose($sClass) If Not WinWaitClose($sClass, '', 5) Then $iResult = 0 EndIf EndIf If $iResult Then $sPrevious = RegRead('HKCU\Software\Microsoft\Windows\CurrentVersion\Applets\Regedit', 'Lastkey') If @error Then $sPrevious = 0 EndIf If RegWrite('HKCU\Software\Microsoft\Windows\CurrentVersion\Applets\Regedit', 'Lastkey', 'REG_SZ', StringReplace($sRegistryKey, $aArray, $sRootKey, 1)) = 0 Then $iResult = 0 Else If Run('regedit.exe') = 0 Then $iResult = 0 If IsString($sPrevious) Then RegWrite('HKCU\Software\Microsoft\Windows\CurrentVersion\Applets\Regedit', 'Lastkey', 'REG_SZ', $sPrevious) EndIf EndIf EndIf EndIf Return $iResult EndFunc ;==>_RegJumpThat reproducer adds the entries! Edited January 2, 2013 by guinness UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
guinness Posted January 2, 2013 Author Share Posted January 2, 2013 (edited) I'm Dumb! _IsValidFileType wasn't detecting the exe extension because of @CRLF at the end. See above, I fixed the code. Edited January 2, 2013 by guinness UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
telmob Posted January 2, 2013 Share Posted January 2, 2013 What a mess heh!? ITS WORKING!!! Its freaking perfect!!! Your name will be in my script till the end of times Link to comment Share on other sites More sharing options...
guinness Posted January 2, 2013 Author Share Posted January 2, 2013 What a mess heh!? ITS WORKING!!! Its freaking perfect!!!Your name will be in my script till the end of times OK, great. UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
guinness Posted January 2, 2013 Author Share Posted January 2, 2013 Updated post #25. I have now merged post #44 into #25 in case I need to update the function in the future. To return an array just set $fReturnArray to True otherwise False will return a @CRLF delimited string. UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
telmob Posted January 5, 2013 Share Posted January 5, 2013 (edited) Hey guinness I'm trying to use your code without the shellall.au3, because i'm using a submenu. I changed the code a bit to try out some things. It now has two different starting commands, /allow and /block. The selected file(s) will call the script name 'SRPE Final.exe /allow' OR 'SRPE Final.exe /block'. The script no longer depends on .exe because its previously defined by registry. So the registry is set to only show the context menu when hovering .exe or .com, etc. The big issue now is that instead of writing the chosen file(s) path to registry, it only writes '/allow' or '/block'. I think my problem lies in one of these parts (or both): Local $aFileList = 0, $sFileList = '' If $CmdLine[0] > 0 Then Switch $CmdLine[1] Case "/block" MsgBox(0, "1", $CmdLine, 4) $WriteRegAllow = 0 For $i = 1 To $CmdLine[0] $sFileList &= $CmdLine[$i] & @CRLF Next $sFileList = '' Case "/allow" MsgBox(0, "2", $CmdLine, 4) $WriteRegAllow = 1 For $i = 1 To $CmdLine[0] $sFileList &= $CmdLine[$i] & @CRLF Next $sFileList = '' EndSwitch EndIf For $i = 1 To $aArray[0] If $WriteRegAllow = 0 Then ; If the file is an exe, then continue. $aArray[$i] = _GetFilename($aArray[$i]) $iCount += 1 $iReturn += RegWrite('HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun\', $aArray[$i], 'REG_SZ', $aArray[$i]) EndIf If $WriteRegAllow = 1 Then ; If the file is an exe, then continue. $aArray[$i] = _GetFilename($aArray[$i]) $iCount += 1 $iReturn += MsgBox(0, "2", "WRITE ALLOW", 4);WritePath($aArray[$i]) EndIf Here's the full script: expandcollapse popup#NoTrayIcon #RequireAdmin #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Outfile=SRPE Final.exe #AutoIt3Wrapper_UseUpx=n #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include #include #include 'WM_COPYDATA.au3' ; http://www.autoitscript.com/forum/topic/119502-solved-wm-copydata-x64-issue Global $WriteRegAllow = 0 If @Compiled Then Example() EndIf Func Example() Local $iFileSent = _WM_COPYDATA_Initial('UniqueIDString', Default) ; Start the communication process. If @error Then If Not _WM_COPYDATA_SendStart(StringReplace(StringStripWS($CmdLineRaw, 3), '"', '')) Then ; Send $CmdLineRaw if there is process already running. MsgBox(4096, '2nd Instance: ' & @error, 'Seems there was an @error, but more than likely $CmdLineRaw was blank.' & @CRLF & @CRLF & $CmdLineRaw) EndIf Exit EndIf Local $aFileList = 0, $sFileList = '' If $CmdLine[0] > 0 Then Switch $CmdLine[1] Case "/block" MsgBox(0, "1", $CmdLine, 4) $WriteRegAllow = 0 For $i = 1 To $CmdLine[0] $sFileList &= $CmdLine[$i] & @CRLF Next $sFileList = '' Case "/allow" MsgBox(0, "2", $CmdLine, 4) $WriteRegAllow = 1 For $i = 1 To $CmdLine[0] $sFileList &= $CmdLine[$i] & @CRLF Next $sFileList = '' EndSwitch EndIf While ProcessExists("notepad.exe") ;############################################################## CHANGE LATER !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Switch GUIGetMsg() Case $iFileSent ; If the WM_COPYDATA message is interecepted then add the data sent to notepad. $sFileList = _WM_COPYDATA_SendShutdown($aFileList) If $sFileList Then $sFileList = StringStripWS($sFileList, 3) & @CRLF ; Strip trailing whitespace. $sFileList = _AddToRegistry($aFileList) EndIf $aFileList = 0 $sFileList = '' EndSwitch WEnd ;~ _DeleteToDisallow() ;~ _ShellAll_Uninstall() ; Remove the running EXE from the Shell ContextMenu. _WM_COPYDATA_Shutdown() Return True EndFunc ;==>Example Func _AddToRegistry(ByRef $aArray) ;~ Local $fDisallow = Number(RegRead('HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\', 'DisallowRun')) == 1 ;~ If Not $fDisallow Then ;~ RegWrite('HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\', 'DisallowRun', 'REG_DWORD', 1) ;~ EndIf Local $iCount = 0, $iReturn = 0 For $i = 1 To $aArray[0] If $WriteRegAllow = 0 Then ; If the file is an exe, then continue. $aArray[$i] = _GetFilename($aArray[$i]) $iCount += 1 $iReturn += RegWrite('HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun\', $aArray[$i], 'REG_SZ', $aArray[$i]) EndIf If $WriteRegAllow = 1 Then ; If the file is an exe, then continue. $aArray[$i] = _GetFilename($aArray[$i]) $iCount += 1 $iReturn += MsgBox(0, "2", "WRITE ALLOW", 4);WritePath($aArray[$i]) EndIf Next If $iReturn = 0 And $iReturn = 0 Then Return False EndIf Return $iCount == $iReturn EndFunc ;==>_AddToRegistry ;~ Func _DeleteToDisallow() ;~ Local $iReturn = RegDelete('HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\', 'DisallowRun') ;~ $iReturn += RegDelete('HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun\') ;~ Return $iReturn == 2 ;~ EndFunc ;==>_DeleteToDisallow Func _GetFilename($sFileName) Return StringRegExpReplace($sFileName, '^.*\\', '') EndFunc ;==>_GetFilename Func _WM_COPYDATA_Initial($sIDString, $hGUI, $fCheckOnly = Default) _WM_COPYDATA_SetID($sIDString) Local Const $vReturn = _WM_COPYDATA_Start($hGUI, $fCheckOnly) Local Const $iError = @error Local $hWnd = WinGetHandle('[REGEXPTITLE:(?m)^' & _WM_COPYDATA_GetID() & '$]') $hWnd = HWnd(ControlGetText($hWnd, '', ControlGetHandle($hWnd, '', 'Edit1'))) _WM_COPYDATA_SetGUI($hWnd) WinSetTitle($hWnd, '', 'START_PROCESS') Return SetError($iError, 0, $vReturn) EndFunc ;==>_WM_COPYDATA_Initial Func _WM_COPYDATA_SendShutdown(ByRef $aArray) If StringStripWS(_WM_COPYDATA_GetData(), 8) <> 'START_PROCESS' Then Return SetError(1, 0, '') EndIf Local $aReturn[1] = [0], $aWinList = 0, $sData = '', $sReturn = '' Do $aWinList = WinList('[REGEXPTITLE:' & _WM_COPYDATA_GetID() & '__CHILD__' & '\d+]') If @error Then ExitLoop EndIf If $aWinList[0][0] Then ReDim $aReturn[($aReturn[0] + 1) + $aWinList[0][0]] For $i = 1 To $aWinList[0][0] $sData = ControlGetText($aWinList[$i][1], '', ControlGetHandle($aWinList[$i][1], '', 'Edit1')) If StringStripWS($sData, 8) Then $aReturn[0] += 1 $aReturn[$aReturn[0]] = $sData $sReturn &= $sData & @CRLF EndIf ControlSetText($aWinList[$i][1], '', ControlGetHandle($aWinList[$i][1], '', 'Edit1'), '') Next EndIf Until $aWinList[0][0] == 0 ReDim $aReturn[($aReturn[0] + 1)] $aArray = $aReturn $aReturn = 0 WinSetTitle(_WM_COPYDATA_GetGUI(), '', 'START_PROCESS') Return $sReturn EndFunc ;==>_WM_COPYDATA_SendShutdown Func _WM_COPYDATA_SendStart($sData) Local Const $sTitle = _WM_COPYDATA_GetID() & '__CHILD__' & @AutoItPID AutoItWinSetTitle($sTitle) Local Const $hWait = WinGetHandle($sTitle) If @error Then Return SetError(1, 0, False) EndIf ControlSetText($hWait, '', ControlGetHandle($hWait, '', 'Edit1'), $sData) If WinGetTitle(_WM_COPYDATA_GetGUI()) = 'START_PROCESS' Then If _WM_COPYDATA_Send('START_PROCESS') Then WinSetTitle(_WM_COPYDATA_GetGUI(), '', 'IN_PROCESS') EndIf EndIf While 1 If StringStripWS(ControlGetText($hWait, '', ControlGetHandle($hWait, '', 'Edit1')), 8) == '' Then ExitLoop EndIf Sleep(250) WEnd Return True EndFunc ;==>_WM_COPYDATA_SendStart You have any idea why this is hapening? Hummm.... The problem is in _GetFilename, right? Edited January 5, 2013 by telmob Link to comment Share on other sites More sharing options...
guinness Posted January 5, 2013 Author Share Posted January 5, 2013 (edited) The problem isn't with my code, you've basically changed the goal posts entirely as before your problem was with a context menu display too many instances when selecting multiple files, this isn't the case anymore. Having put so much effort into your issue before, I don't feel like wasting another weekend again on this. Sorry. Plus, I think you need to re-work your thought process on this and what you actually want to do and/or get out of it. Edited January 5, 2013 by guinness UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 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