Ayush Posted February 17, 2007 Share Posted February 17, 2007 I am using this script to to what i want(btw, this compose window is great ): CODEAutoItSetOption ( "TrayMenuMode" ,1 ) AutoItSetOption("WinTitleMatchMode", 4) If NOt WinActive("classname=ExploreWClass") And Not WinActive("classname=CabinetWClass") And Not WinActive("classname=Progman") Then TrayTip("Quitting-","No Explorer window active." ,3,3) Sleep(5750) Exit EndIf AutoItSetOption ( "TrayIconHide" ,1 ) $optionKey = "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" $valueName = "ShowSuperHidden" $NewValue = 1 If RegRead($optionKey,$valueName) Then $NewValue = 0 RegWrite($optionKey,$valueName,"REG_DWORD",$NewValue) ;$hWnd = ControlGetHandle("active","","SysListView321") ;DllCall("user32.dll", "long", "SendMessage", "hwnd", $hWnd, "int", 0x111, "int", 28931, "int", 0) ControlSend("active","","SysListView321"," ^ +{F10}") Sleep(250) ControlSend("active","","SysListView321","e") The problem is this uses Send which i dont like. I tried DllCall (as you can see in comment) but it didn't work. How can i refresh the folder/desktop(without using Send..) after updating the reg value ? and why the F5 doesn't work here ? this is my first auto-it script so any suggestions welcome.. Link to comment Share on other sites More sharing options...
Hello Me You Posted February 17, 2007 Share Posted February 17, 2007 Send("{F5}") Random Link to comment Share on other sites More sharing options...
Ayush Posted February 17, 2007 Author Share Posted February 17, 2007 Send("{F5}")F5 does refresh the view but it never updates the file list. What's more strange is, after updating the reg value, you can navigate away from the folder and come back, but the file list will be SAME but if you right click and choose "Refresh"- the list is updated !! Link to comment Share on other sites More sharing options...
Ayush Posted February 17, 2007 Author Share Posted February 17, 2007 (edited) No .. doesn't work.. ok i want to give the DllCall (SendMessage) a try.. can you check that.. is it correct ? i want to run WM_COMMAND > 28931 i think explorer uses that message when you choose Refresh on contextmenu. edit: i am sure that will work (WM_COMMAND > 28931) because i just tested that with AutoHotKey... so can you tell me what is wrong with that DllCall ? Edited February 17, 2007 by Ayush Link to comment Share on other sites More sharing options...
Ayush Posted February 18, 2007 Author Share Posted February 18, 2007 Anyone .. I just want to know how to run WM_COMMAND 28931 Link to comment Share on other sites More sharing options...
Ayush Posted February 18, 2007 Author Share Posted February 18, 2007 (edited) Edited February 18, 2007 by Ayush Link to comment Share on other sites More sharing options...
MrCreatoR Posted February 18, 2007 Share Posted February 18, 2007 Well, i use this method for toogle hidden folders and for toogle files extensions: For Tootgle hidden folders: expandcollapse popup$ReadHideFileExt = RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "Hidden") If $ReadHideFileExt = 1 Then RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "Hidden", "REG_DWORD", 2) Else RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "Hidden", "REG_DWORD", 1) EndIf UpdateExplorer() Func UpdateExplorer() Local $DeskNotActive = 0 Opt("WinTitleMatchMode", 4) $PropsTitle = "classname=#32770" Run("RunDll32.exe shell32.dll,Options_RunDLL 0") WinWait($PropsTitle, "", 15) ControlCommand($PropsTitle, "", "SysTabControl321", "TabRight", "") Sleep(200) ControlClick($PropsTitle, "", "Button5") $WinExpListArr = _ExplWinGetList() If IsArray($WinExpListArr) Then $ActiveWindow = $WinExpListArr[1] For $iWin = 1 To $WinExpListArr[0] $GetWinState = WinGetState($WinExpListArr[$iWin]) WinActivate($WinExpListArr[$iWin]) WinWaitActive($WinExpListArr[$iWin], "", 10) Send("{F5}") If $GetWinState = 23 Then WinSetState($WinExpListArr[$iWin], "", @SW_MINIMIZE) Next WinActivate($ActiveWindow) EndIf If Not WinActive("classname=Progman") Then $DeskNotActive = 1 WinMinimizeAll() Sleep(300) EndIf Send("{F5}") If $DeskNotActive = 1 Then WinMinimizeAllUndo() EndFunc Func _ExplWinGetList() Opt("WinTitleMatchMode", 4) $WinList = WinList("classname=CabinetWClass") If IsArray($WinList) Then Local $WinListArr[$WinList[0][0]+1] For $iW = 1 To $WinList[0][0] $WinListArr[$iW] = $WinList[$iW][0] Next $WinListArr[0] = $WinList[0][0] Return $WinListArr Else Return "" EndIf EndFuncoÝ÷ ØZ+¶ çâëÆק²*'jëh×6$ReadHideFileExt = RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "HideFileExt") If $ReadHideFileExt = 1 Then RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "HideFileExt", "REG_DWORD", 0) Else RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "HideFileExt", "REG_DWORD", 1) EndIf UpdateExplorer() Func UpdateExplorer() Local $DeskNotActive = 0 Opt("WinTitleMatchMode", 4) $PropsTitle = "classname=#32770" Run("RunDll32.exe shell32.dll,Options_RunDLL 0") WinWait($PropsTitle, "", 15) ControlCommand($PropsTitle, "", "SysTabControl321", "TabRight", "") Sleep(200) ControlClick($PropsTitle, "", "Button5") $WinExpListArr = _ExplWinGetList() If IsArray($WinExpListArr) Then $ActiveWindow = $WinExpListArr[1] For $iWin = 1 To $WinExpListArr[0] $GetWinState = WinGetState($WinExpListArr[$iWin]) WinActivate($WinExpListArr[$iWin]) WinWaitActive($WinExpListArr[$iWin], "", 10) Send("{F5}") If $GetWinState = 23 Then WinSetState($WinExpListArr[$iWin], "", @SW_MINIMIZE) Next WinActivate($ActiveWindow) EndIf If Not WinActive("classname=Progman") Then $DeskNotActive = 1 WinMinimizeAll() Sleep(300) EndIf Send("{F5}") If $DeskNotActive = 1 Then WinMinimizeAllUndo() EndFunc Func _ExplWinGetList() Opt("WinTitleMatchMode", 4) $WinList = WinList("classname=CabinetWClass") If IsArray($WinList) Then Local $WinListArr[$WinList[0][0]+1] For $iW = 1 To $WinList[0][0] $WinListArr[$iW] = $WinList[$iW][0] Next $WinListArr[0] = $WinList[0][0] Return $WinListArr Else Return "" EndIf EndFunc Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team Link to comment Share on other sites More sharing options...
MrCreatoR Posted February 18, 2007 Share Posted February 18, 2007 Or, if you do not want to see the “Folder Options” dialog, then try this: expandcollapse popup$ReadHideFileExt = RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "HideFileExt") If $ReadHideFileExt = 1 Then RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "HideFileExt", "REG_DWORD", 0) Else RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "HideFileExt", "REG_DWORD", 1) EndIf UpdateExplorer() Func UpdateExplorer() Local $DeskNotActive = 0, $ActiveWindow = WinGetTitle("") $WinExpListArr = _ExplWinGetList() If IsArray($WinExpListArr) Then For $iWin = 1 To $WinExpListArr[0] $GetWinState = WinGetState($WinExpListArr[$iWin]) WinActivate($WinExpListArr[$iWin]) WinWaitActive($WinExpListArr[$iWin], "", 10) ControlSend($WinExpListArr[$iWin], "", "SysListView321"," ^ +{F10}") Send("{down 3}") Send("{enter}") WinSetState($WinExpListArr[$iWin], "", $GetWinState) Next WinActivate($ActiveWindow) EndIf Opt("WinTitleMatchMode", 4) If Not WinActive("classname=Progman") Then $DeskNotActive = 1 WinMinimizeAll() Sleep(300) EndIf Send("{F5}") If $DeskNotActive Then WinMinimizeAllUndo() EndFunc Func _ExplWinGetList() Opt("WinTitleMatchMode", 4) $WinList = WinList("classname=CabinetWClass") If IsArray($WinList) Then Local $WinListArr[$WinList[0][0]+1] For $iW = 1 To $WinList[0][0] $WinListArr[$iW] = $WinList[$iW][0] Next $WinListArr[0] = $WinList[0][0] Return $WinListArr Else Return "" EndIf EndFunc Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team Link to comment Share on other sites More sharing options...
Ayush Posted February 18, 2007 Author Share Posted February 18, 2007 (edited) @MsCreatoR 1st Reply: I dont like Send and this is even worse! @2nd Reply: Yeah.. that's what i am using now but as i mentioned,I prefer not to use Send when possible. In this case, it is possible by sending WM_command 28931 but NOONE WANTS TO TELL ME HOW TO SEND THAT COMMAND Thanks for the reply, anyway .. Edited February 18, 2007 by Ayush Link to comment Share on other sites More sharing options...
MrCreatoR Posted February 18, 2007 Share Posted February 18, 2007 AyushI dont like SendI don't like it to, but just sometimes, we have to match ourselves to the environment, not the opposite .If someone can find a way to refresh the folder using direct sending message (using DllCall()), i be werry glad, but if not, it's ok, I accept it as it is (as i posted in exampales).P.SBy the way, I was already ask about it here. Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team Link to comment Share on other sites More sharing options...
MrCreatoR Posted February 18, 2007 Share Posted February 18, 2007 I got it! look this method (it send refresh to all opened explorer windows, and at the end send refresh to the desktop - without any windows toogle or any dialogs) : expandcollapse popup$RegKey = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" If RegRead($RegKey, "HideFileExt") Then RegWrite($RegKey, "HideFileExt", "REG_DWORD", 0) Else RegWrite($RegKey, "HideFileExt", "REG_DWORD", 1) EndIf UpdateExplorer() Func UpdateExplorer() $WinExpListArr = _ExplWinGetList() If IsArray($WinExpListArr) Then For $iWin = 1 To $WinExpListArr[0] $GetWinState = WinGetState($WinExpListArr[$iWin]) $Hwnd = WinGetHandle($WinExpListArr[$iWin]) DllCall("user32.dll", "long", "SendMessage", "hwnd", $hWnd, "int", 0x111, "int", 28931, "int", 0) Next EndIf Opt("WinTitleMatchMode", 4) $Hwnd = WinGetHandle("classname=Progman") DllCall("user32.dll", "long", "SendMessage", "hwnd", $hWnd, "int", 0x111, "int", 28931, "int", 0) EndFunc Func _ExplWinGetList() Opt("WinTitleMatchMode", 4) $WinList = WinList("classname=CabinetWClass") If IsArray($WinList) Then Local $WinListArr[$WinList[0][0]+1] For $iW = 1 To $WinList[0][0] $WinListArr[$iW] = $WinList[$iW][0] Next $WinListArr[0] = $WinList[0][0] Return $WinListArr Else Return "" EndIf EndFunc Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team Link to comment Share on other sites More sharing options...
MrCreatoR Posted February 18, 2007 Share Posted February 18, 2007 And this one for toogle hidden folders: expandcollapse popup$RegKey = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" If RegRead($RegKey, "Hidden") = 1 Then RegWrite($RegKey, "Hidden", "REG_DWORD", 2) Else RegWrite($RegKey, "Hidden", "REG_DWORD", 1) EndIf UpdateExplorer() Func UpdateExplorer() $WinExpListArr = _ExplWinGetList() If IsArray($WinExpListArr) Then For $iWin = 1 To $WinExpListArr[0] $GetWinState = WinGetState($WinExpListArr[$iWin]) $Hwnd = WinGetHandle($WinExpListArr[$iWin]) DllCall("user32.dll", "long", "SendMessage", "hwnd", $hWnd, "int", 0x111, "int", 28931, "int", 0) Next EndIf Opt("WinTitleMatchMode", 4) $Hwnd = WinGetHandle("classname=Progman") DllCall("user32.dll", "long", "SendMessage", "hwnd", $hWnd, "int", 0x111, "int", 28931, "int", 0) EndFunc Func _ExplWinGetList() Opt("WinTitleMatchMode", 4) $WinList = WinList("classname=CabinetWClass") If IsArray($WinList) Then Local $WinListArr[$WinList[0][0]+1] For $iW = 1 To $WinList[0][0] $WinListArr[$iW] = $WinList[$iW][0] Next $WinListArr[0] = $WinList[0][0] Return $WinListArr Else Return "" EndIf EndFunc Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team Link to comment Share on other sites More sharing options...
Ayush Posted February 18, 2007 Author Share Posted February 18, 2007 I got it!Really... i already tried that (see my code above)... you used the same thing and you are saying you got it ! But nevermind... I AM HAPPY i was using ControlGetHandle to get the SysListView handle... i tried with WinGetHandle and it worked !! thanks.. Link to comment Share on other sites More sharing options...
Jamaica Posted August 17, 2007 Share Posted August 17, 2007 The code works great but i'm having issues with it running under Windows 2000. This line always error out. Run("RunDll32.exe shell32.dll,Options_RunDLL 0") Error says unable to execute external program.Directory name is invalid. I tried using a literal as Run("C:\winnt\system32\RunDll32.exe shell32.dll,Options_RunDLL 0") but the result error is the same. Any help would be greatful. Link to comment Share on other sites More sharing options...
MrCreatoR Posted August 17, 2007 Share Posted August 17, 2007 Hi, As i see from the screen, you are using wrong method, try this: ShellExecute(@SystemDir & "\RunDll32.exe", "shell32.dll,Options_RunDLL 0") But why do you need this? Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team Link to comment Share on other sites More sharing options...
MCP Posted September 13, 2007 Share Posted September 13, 2007 MsCreatoR: thanks a lot! Link to comment Share on other sites More sharing options...
Xichael Posted February 27, 2008 Share Posted February 27, 2008 MsCreatoR, the UpdateExplorer() function in your scripts is crashing AutoIt... What's wrong? Link to comment Share on other sites More sharing options...
MrCreatoR Posted February 27, 2008 Share Posted February 27, 2008 UpdateExplorer() function in your scripts is crashing AutoItWhat AutoIt version you are using? and what do you mean by crashing? is there any messsages popup? Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team Link to comment Share on other sites More sharing options...
Xichael Posted February 28, 2008 Share Posted February 28, 2008 What AutoIt version you are using? and what do you mean by crashing? is there any messsages popup?I'm running the most recent version (v3.2.10.0), and it gives no error message when it crashes. Windows error reporting does pop up however. Link to comment Share on other sites More sharing options...
MrCreatoR Posted February 28, 2008 Share Posted February 28, 2008 I remembered now that i had these hard-crashes too. It might be related to RAM shortage. I only can post a little changed code (for the latest AutoIt version compatibility), but it's will not prevent the hard-crashes i think: expandcollapse popup#NoTrayIcon $RegKey = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" If RegRead($RegKey, "Hidden") = 1 Then RegWrite($RegKey, "Hidden", "REG_DWORD", 2) Else RegWrite($RegKey, "Hidden", "REG_DWORD", 1) EndIf UpdateExplorer() Func UpdateExplorer() Local $hWnd, $WinExpListArr = _ExplWinGetList() Local Const $WM_COMMAND = 0x0111 If IsArray($WinExpListArr) Then For $iWin = 1 To $WinExpListArr[0] $hWnd = WinGetHandle($WinExpListArr[$iWin]) DllCall("user32.dll", "none", "SendMessage", "hwnd", $hWnd, "int", $WM_COMMAND, "int", 28931, "int", 0) Next EndIf $hWnd = WinGetHandle("[CLASS:Progman]") DllCall("user32.dll", "none", "SendMessage", "hwnd", $hWnd, "int", $WM_COMMAND, "int", 28931, "int", 0) EndFunc ;==>UpdateExplorer Func _ExplWinGetList() Local $WinList = WinList("[CLASS:CabinetWClass]") If IsArray($WinList) Then Local $WinListArr[$WinList[0][0] + 1] $WinListArr[0] = $WinList[0][0] For $iW = 1 To $WinList[0][0] $WinListArr[$iW] = $WinList[$iW][0] Next Return $WinListArr EndIf Return "" EndFunc ;==>_ExplWinGetList Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team 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