Kendall Posted October 8, 2011 Share Posted October 8, 2011 So i made a shell/ front end for a touch screen for a car OS. This is a cool program the only issue is that when i run it as the shell the only thing the refreashes is the time ( label). but not any of the images show. I have found that if i close the program and start the Explorer.exe shell and then close explorer.exe then the programs GUI shows just fine. Is there something that the explorer starts that autoit's GUIcreate requires? Also i have tried to start other programs in the begining of the script ( Notepad Ect) and they all start up with no issues. If anyone can help please do. I have been racking my brain and searching for months now. If at all possible i dont want to place my whole Code on the forum so if there is a specific section that is needed please let me know. Thank, Kendall The Codemonkeyhttp://www.BMVHDloader.com Link to comment Share on other sites More sharing options...
eukalyptus Posted October 8, 2011 Share Posted October 8, 2011 Hmm... I never had problems using shell replacement scripts on WinXP and Win7! please post a small example script (and image) that shows the issue DirectSound UDF Direct2D UDF AutoIt ScreenSaver Collection BASS UDF v10 download Link to comment Share on other sites More sharing options...
Kendall Posted October 9, 2011 Author Share Posted October 9, 2011 (edited) Here i will post what i have for you. Edit: Sorry i will post a Image for you showing what is showing on the screen as soon as i can. expandcollapse popup#cs ---------------------------------------------------------------------------- Product: Trooper OS Beta Author: Kendall Bennett Copyright: Script Function: Trooper Computer Front End ( Shell) #ce ---------------------------------------------------------------------------- #Region AutoIt3Wrapper directives section ;** File indformation used by AutoIt3Wrapper.exe. ;=============================================================================================================== #AutoIt3Wrapper_Version= ;(B/P) Use Beta or Production for AutoIt3 and AUT2EXE. Default is P #AutoIt3Wrapper_Icon=icon.ico ;Filename of the Ico file to use ://////=__= ://////=__=. #AutoIt3Wrapper_Res_Comment= ;Comment field #AutoIt3Wrapper_Res_Description=Trooper OS ://////=__==31A1605C-2AE7-443C-8BFA-E6E3F674E138} #AutoIt3Wrapper_Res_Fileversion= ;File Version #AutoIt3Wrapper_Res_FileVersion_AutoIncrement= ;(Y/N/P) AutoIncrement FileVersion After #AutoIt3Wrapper_Res_Language= ;Resource Language code . default 2057=English (United Kingdom) #AutoIt3Wrapper_Res_LegalCopyright=2010 - 2011 ;=============================================================================================================== #include <File.au3> #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> ;Used #include <GuiEdit.au3> #include <ComboConstants.au3> #include <DateTimeConstants.au3> #include <StaticConstants.au3> #Include <Excel.au3> #Include <Timers.au3> #include <Date.au3> #include <GuiRichEdit.au3> #include <array.au3> #Include <Clipboard.au3> #Include <Misc.au3> ;#include <GuiCtrlCreateHyperlink.au3> ; Special Include File #include <GuiConstants.au3> #include <GUIConstantsEx.au3> #include <TabConstants.au3> #include <WindowsConstants.au3> #include "GIFAnimation.au3" #include "loadingscreen.au3" #include "lightsfunc.au3" #include "clickimagesfunc.au3" #include <exitfunc.au3> #NoTrayIcon WinSetState("[CLASS:ConsoleWindowClass]", "", @SW_HIDE) ; Hides Command prompt in Windows Embeded from showing on screen. ;************** Kills explorer while starting ;ProcessClose ( "explorer.exe") Run ( "c:\windows\system32\WindowsPowerShell\v1.0\powershell.exe" ); WinWaitActive ( "[CLASS:ConsoleWindowClass]") WinSetState("[CLASS:ConsoleWindowClass]", "", @SW_HIDE) ControlSend("[CLASS:ConsoleWindowClass]", "", "", "taskkill /f /im explorer.exe") ControlSend("[CLASS:ConsoleWindowClass]", "", "", "{ENTER}") ControlSend("[CLASS:ConsoleWindowClass]", "", "", "Exit") ControlSend("[CLASS:ConsoleWindowClass]", "", "", "{ENTER}") ;If ProcessExists ( "explorer.exe") Then ; MsgBox (49, "Unable to close Explorer.exe", "Unable to close Explorer.exe" & @CRLF & "Issue could be related to:" & @CRLF & "Antivirus program running" & @CRLF & "Windows missing\corrupt Taskkill.exe or other OS issues." & @CRLF & "If you continue there may be unwanted visual issues.") ;Else ;EndIf ;******* Custom includes ;#include <Exitscreen.au3> ; Exit Screen ; removed due to is not allowing window control. ;******* End Custom Includes Global $settingsini, $iniread1, $oIE, $wData[5], $time, $cityLabel, $Foglights, $foglighton, $foglightoff, $Pic1, $Pic2, $Pic3, $Pic4, $Pic5, $shuthibernate;Sets objects as global objects not local Local $connectionstatus ;=============== Clock Font $clockfont = ("Centaur");=============== Clock Font ; Possable fonts ;Agency FB ;Arabic Typesetting ;Niagara Engraved ;Centaur ; ; $relayctrlwindow= ("K8055 USB Experiment Interface Board"); Relay Control Window Name ; *************************** Start File Read Locations $settingsini =("data\settings.ini") ;INI file location ;***** Start Ini Read information $cursorstate = IniRead ( $settingsini, "settings", "Cursor" ,"" ) $logolocation= IniRead ( $settingsini, "settings", "logo", "" ) ;* Logo Image ini location $gpsprogram = IniRead ( $settingsini, "settings", "GPSprogram" ,"" ) $background = IniRead ( $settingsini, "settings", "background" ,"" ) $Splash = IniRead ( $settingsini, "settings", "SplashScreen" ,"" ) $Musicprogram = IniRead ( $settingsini, "settings", "MusicProgram", "") $splashimage = IniRead ( $settingsini, "settings", "Splashimage" ,"" ) ; also in the Splash.exe so that it knows the location. $shuthibernate = IniRead ( $settingsini, "settings", "shutdownhibernate" ,"" ) ; Select shutdown or hibernate when clicking shutdown button $gpsprogramclass= IniRead ( $settingsini, "settings", "gpsprogramclass" ,"" ) $Keyboardprogram= IniRead ( $settingsini, "settings", "Keyboardprogram" ,"" ) ;***** End Ini Read information ;===== Lights picture on OFF locations $foglighton = ("Images\Slices\Lights ON\FogLightson.jpg") $foglightoff = ("Images\Slices\Lights off\FogLightsoff.jpg") $headlighttopon = ("Images\Slices\Lights ON\headlighttopon.jpg") $headlighttopoff = ("Images\Slices\Lights off\headlighttopoff.jpg") $headlightrighton = ("Images\Slices\Lights ON\headlightrighton.jpg") $headlightrightoff = ("Images\Slices\Lights off\headlightrightoff.jpg") $headlightlefton = ("Images\Slices\Lights ON\headlightlefton.jpg") $headlightleftoff = ("Images\Slices\Lights off\headlightleftoff.jpg") ;=== End Lights Picture on off ;****** Start image locations $Powerbuttonpic = ("Images\Slices\Power Button.jpg") $Powerbuttonpicclick = ("Images\Slices\Power button click.jpg") $musicbuttonpic = ("Images\Slices\Music.jpg") $musicbuttonpicclick = ("Images\Slices\musicclick.jpg") $moviesbuttonpic = ("Images\Slices\Movies.jpg") $moviesbuttonpicclick = ("Images\Slices\Moviesclick.jpg") $gamesbuttonpic = ("Images\Slices\Games.jpg") $gamesbuttonpicclick = ("Images\Slices\gamesclick.jpg") $Keyboardbuttonpic = ("Images\Slices\keyboard.gif") $Keyboardbuttonclick = ("Images\Slices\keyboardClick.gif") ;======Start Splash section ;Run ($Splash);****** Starts the Starting Splash for trooper computer. ;Sleep ( 2000) ;======End splash section ;====== Pre starts Winamp If WinExists("[CLASS:BaseWindow_RootWnd]") Then Else Run ( $Musicprogram, "", @SW_MINIMIZE ) EndIf ;================================================= time/ 12 hour Clock Function $time2 = @SEC Func Clock() If $time2 <> @MIN then ;GUICtrlSetData ( $Hourb, (@HOUR/24) * 100) ;GUICtrlSetData ( $time, (@MIN/60) * 100) ;GUICtrlSetData ( $time, (@SEC/60) * 100) ;GUICtrlSetData ( $time , @SEC) Global $iHour = @HOUR, $sAMPM = "AM" If $iHour >= 12 Then $sAMPM = "PM" If $iHour = 00 Then $iHour = 12 If $iHour > 12 Then $iHour -= 12 If $iHour = 01 Then $iHour = 1 If $iHour = 02 Then $iHour = 2 If $iHour = 03 Then $iHour = 3 If $iHour = 04 Then $iHour = 4 If $iHour = 05 Then $iHour = 5 If $iHour = 06 Then $iHour = 6 If $iHour = 07 Then $iHour = 7 If $iHour = 08 Then $iHour = 8 If $iHour = 09 Then $iHour = 9 GUICtrlSetData ( $time , $ihour & ":" & @MIN & "" & $sAMPM ) $time2 = @MIN Endif EndFunc ;======================== End Time/ 12 Clock Fnction ;======== Light status check _relay1statuscheck() ;======== End light status check #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("TrooperOS", 800, 600, 260, 45, BitOR($WS_MINIMIZEBOX,$WS_MAXIMIZE,$WS_POPUP,$WS_GROUP)) $Pic1 = GUICtrlCreatePic("Images\Slices\Backgroundwire.jpg", 0, 0, 800, 600) GuiCtrlSetState(-1,$GUI_DISABLE) ; Disables Background image so others are clickable ******* Very Important******* $Pic2 = GUICtrlCreatePic( $musicbuttonpic, 0, 77, 140, 52) $Pic3 = GUICtrlCreatePic( $moviesbuttonpic, 0, 160, 140, 52) $Pic4 = GUICtrlCreatePic( $gamesbuttonpic, 3, 240, 140, 60) $Pic5 = GUICtrlCreatePic("Images\Slices\Apps.jpg", 0, 324, 140, 60) $Pic6 = GUICtrlCreatePic("Images\Slices\GPS.jpg", 0, 416, 132, 60) $Pic7 = GUICtrlCreatePic("Images\Slices\Settings.jpg", 0, 524, 124, 76) $Pic8 = GUICtrlCreatePic("Images\Slices\Lights.jpg", 216, 0, 140, 60) $Pic9 = GUICtrlCreatePic( $Powerbuttonpic, 717, 520, 83, 80) $Time = GUICtrlCreateLabel( "", 448, 152, 155, 42);Start Time label Gui GUICtrlSetFont($Time, 25, 400, 2, $clockfont) GUICtrlSetColor ( $Time, 0x00FF00) GUICtrlSetBkColor(-1, 0x000000) $Foglights = GUICtrlCreatePic($foglightoff, 535, 240, 53, 21) $Headlightleft = GUICtrlCreatePic($headlightleftoff, 483, 240, 52, 21) $headlightright = GUICtrlCreatePic($headlightrightoff, 588, 240, 52, 21) $Headlighttop = GUICtrlCreatePic($headlighttopoff, 483, 197, 157, 43) $keyboard = GUICtrlCreatePic( $Keyboardbuttonpic, 632, 0, 74, 56) GUISetState(@SW_UNLOCK) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### ;***************** Starts Winamptray\ Preloads Run ( "data\Winamp\winampa.exe") ;============ Get weather data from Google API ;_draw() ;Re-Draw Google weather Data ;============ Get weather data from Google API ;***************** Starts Relay program If WinExists("K8055 USB Experiment Interface Board") Then Else Run ( "C:\Program Files\Velleman\K8055\K8055_Demo.exe", "", @SW_MINIMIZE ) WinWaitActive ($relayctrlwindow, "", 2) ControlClick( $relayctrlwindow, "Connect", "[CLASS:TButton; INSTANCE:7]"); Connects to card 0 ( Default) EndIf Sleep ( 1000 ); Milliseconds WinSetState ( "K8055 USB Experiment Interface Board", "",@SW_HIDE ) ;********* Disables The mouse _SetCursorState($cursorstate) Func _SetCursorState($bValue = 1) DllCall('User32.dll', 'int', 'ShowCursor', 'int', $bValue) EndFunc ;********* End Disable mouse Section AdlibRegister("Clock") While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Pic2 ; Music _Musicbuttonroll() If WinActivate ("[CLASS:BaseWindow_RootWnd]") Then Else Run ( $Musicprogram) EndIf Case $Pic3 ; Movies _moviebuttonroll() ;Run ( "notepad.exe" ) Case $Pic4 ; Games _gamesbuttonroll() ;Run ( "notepad.exe" ) Case $Pic5 ;Apps _Loadingscreen () ;Below this line needs to be fixed for a smother transition ( try to use @comspec) Run ( "cmd"); WinWaitActive ( "[CLASS:ConsoleWindowClass]") WinSetState("[CLASS:ConsoleWindowClass]", "", @SW_HIDE) ControlSend("[CLASS:ConsoleWindowClass]", "", "", "cd C:\Trooper OS\data\Opera Mobile Emulator") ControlSend("[CLASS:ConsoleWindowClass]", "", "", "{ENTER}") ControlSend("[CLASS:ConsoleWindowClass]", "", "", "OperaMobileEmu.exe -fullscreen -tabletui") ControlSend("[CLASS:ConsoleWindowClass]", "", "", "{ENTER}") ControlSend("[CLASS:ConsoleWindowClass]", "", "", "exit") ControlSend("[CLASS:ConsoleWindowClass]", "", "", "{ENTER}") Case $Pic6 ; GPS if WinExists ( $gpsprogramclass) Then WinActivate ( $gpsprogramclass) Else Run ( $gpsprogram ) _Loadingscreen () EndIf Case $Pic7 ; Settings Dim $ExitMsgBox $ExitMsgBox = MsgBox(4,"Exit?","Exit Trooper OS to change settings- If this is the Shell it may leave you without a way to control the computer.", 10 ) Select Case $ExitMsgBox = 6 ;Yes Run ( "explorer.exe") WinClose ( "TrooperOS" ) WinClose ( "[CLASS:BaseWindow_RootWnd]") If WinActivate ("Trooper OS settings" ) Then Else Run ( "data\settings.exe") _Loadingscreen () ExitLoop EndIf Case $ExitMsgBox = 7 ;No EndSelect Case $Pic8 ; Lights If WinActivate ("Lights" ) Then else _Loadingscreen () run ( "Lights.exe" ) EndIf Case $Pic9 ; Exit _Powerbuttonroll() If WinActivate ("Exitscreen" ) Then else _exitscreen() ; run ( "Exitscreen.exe" ) EndIf ;Dim $ExitMsgBox ; $ExitMsgBox = MsgBox(4,"Exit?","Exit Trooper OS- If this is the Shell it may leave you without a way to control the computer.", 10 ) ;Select ;Case $ExitMsgBox = 6 ;Yes ; WinClose ( "[CLASS:BaseWindow_RootWnd]") ; ExitLoop ; ; Case $ExitMsgBox = 7 ;No ; ; EndSelect Case $keyboard ; Keyboard Icon _keyboardbuttonroll() If WinActivate ( "[CLASS:OSKMainClass]" ) Then Else run ( $Keyboardprogram) EndIf Case $time _WinAPI_RedrawWindow ($Form1) Case $Foglights _Relay1(); Fog lights Case $Headlightleft _Relay1(); Fog lights Case $headlightright _Relay1(); Fog lights Case $Headlighttop _Relay1(); Fog lights EndSwitch WEnd Edited October 9, 2011 by Kendall The Codemonkeyhttp://www.BMVHDloader.com Link to comment Share on other sites More sharing options...
Kendall Posted October 9, 2011 Author Share Posted October 9, 2011 (edited) Not Working 1 Starting as the Shell Not working 2 Starting as the Shell ( Bottom) Working when running just in the startup. Edited October 9, 2011 by Kendall The Codemonkeyhttp://www.BMVHDloader.com Link to comment Share on other sites More sharing options...
Kendall Posted October 10, 2011 Author Share Posted October 10, 2011 Issue happens in Windows XP, Window 7 and Windows 8 (Developer preview) Anyone have any ideas? The Codemonkeyhttp://www.BMVHDloader.com Link to comment Share on other sites More sharing options...
Kendall Posted October 20, 2011 Author Share Posted October 20, 2011 I will take it that no-one has any clues??? I am going to Reverse this program and start back from the beginning to see where the issue comes into play. Ill post what i have discovered when i find out. The Codemonkeyhttp://www.BMVHDloader.com Link to comment Share on other sites More sharing options...
Kendall Posted October 20, 2011 Author Share Posted October 20, 2011 (edited) K so I dug it down to this.It has got to be a issue with a dependency in windows for the images. Here is a simple example. I am going to provide a link for the Script and the photobeing used as this. You can use any image that is 800X600 if you need to. Code#include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> issue\Test\Form1.kxf $Form1 = GUICreate("Form1", 801, 601, 192, 124) $Pic1 = GUICtrlCreatePic("Background.jpg", 0, 0, 800, 600) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd http://Lawsserver.mine.nu/Troopercomputer/TestGui.zip Edited October 20, 2011 by Kendall The Codemonkeyhttp://www.BMVHDloader.com Link to comment Share on other sites More sharing options...
guinness Posted October 20, 2011 Share Posted October 20, 2011 (edited) I ran the example above and got this >> I can't see what the problem is. Using the latest beta and on Windows 7 x64. Edited October 20, 2011 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...
Kendall Posted October 27, 2011 Author Share Posted October 27, 2011 (edited) Did you run it in the startup or as the shell? HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon You get the same results where it does not draw the images when run in the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Run Just to start it up. Only way that it will draw properly is if windows Shell loads ( Explorer.exe) then it is ran. I have tested the example on Virtual machines and countless computers and Windows OS's with the same results. Was the Above image Cropped? unless your monitor is set to 800X600 it would have to have been. Leaving me to believe it was not run as the shell. Edited October 27, 2011 by Kendall The Codemonkeyhttp://www.BMVHDloader.com Link to comment Share on other sites More sharing options...
guinness Posted October 27, 2011 Share Posted October 27, 2011 (edited) Did you run it in the startup or as the shell?Nope! You didn't mention that in your test code post. I just can't understand why you need to close explorer.exe? Surely you can just run the application full-screen? Or am I missing something glaringly obvious. Was the Above image Cropped? unless your monitor is set to 800X600.No, I just captured the active window which takes up about 60% of the viewable area. Edited October 27, 2011 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...
Kendall Posted October 27, 2011 Author Share Posted October 27, 2011 Nope! You didn't mention that in your test code post. I just can't understand why you need to close explorer.exe? Surely you can just run the application full-screen? Or am I missing something glaringly obvious. The Reason being is i am trying to use it as the Windows Shell, (Instead of explorer.exe) This is because this is the computer in my truck. It slims down all of the bloatyness associated with start up in all windows OS's. I can start it as just a startup program but then it shows the windows desktop. There are other replacement shells out there but i am trying to make this on my own, More as a hobby and hopefully down the road place it in a Win embedded device. Sorry i didnt mention it in the post about the Reg setting/ Shell replacement. I thought the title would be enough. If there is some dependency that is causing this i may be able to start it before the Gui loads so that it will Draw the images on the screen. Others could benefit from this as well im sure. That way they can make awesome shells instead of relying on MS's The Codemonkeyhttp://www.BMVHDloader.com Link to comment Share on other sites More sharing options...
guinness Posted October 27, 2011 Share Posted October 27, 2011 (edited) Now I've replicated the problem on Windows XP SP3 with V3.3.6.1. Not being a Dev I can only speculate that there is no workaround, though you have to expect this since explorer.exe is pretty integral to running Windows. The Reason being is i am trying to use it as the Windows Shell, (Instead of explorer.exe) This is because this is the computer in my truck. It slims down all of the bloatyness associated with start up in all windows OS's.You haven't mentioned what operating system you're actually using. Like I said I can't wrap my head around why you want to kill explorer.exe for the sake of saving a couple of seconds, you could be checking the oil or tyre pressure in that time I thought the title would be enough.OK, I didn't notice it sorry. I know this isn't what you were expecting and I could be wrong, so we'll wait to see if others come on board with a different approach. Edited October 27, 2011 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...
Kendall Posted October 27, 2011 Author Share Posted October 27, 2011 (edited) I did mention the OS's. Win7 XP. And. Windows8 all builds, 32 & 64 bit. The Hal doesn't matter cause it happens in all. Weird part is you can start explorer. Then close Explorer it works fine. Explorer. exe is not a integral part of the OS. It is just the shell. There is a dependency/ service that is being started when explorer loads that autoit uses I just need to figure out what it is. Edited: due to spelling errors while posting on phone. Edited October 28, 2011 by Kendall The Codemonkeyhttp://www.BMVHDloader.com Link to comment Share on other sites More sharing options...
guinness Posted October 27, 2011 Share Posted October 27, 2011 You have 6 operating systems installed on one machine? OK, thanks for clarifying. Like I said I'm going to bow out gracefully now. Good luck. 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...
Kendall Posted November 11, 2011 Author Share Posted November 11, 2011 OK, So i have been using Process Explorer to try to dwindle down what the dependency is that is causing it not to draw properly. I have tried to update the image using (GUICtrlSetImage) and that is not working as well. These are the process's running that i have tried to use processwait to see if it would allow it to redraw, ( If you run the program then close it and re-open it it will draw the images fine on the second opening) smss.exe csrss.exe winlogon.exe services.exe ( This Also has multiple DLL's that it starts) wmiprvse.exe svchost.exe ( There are multiple SVCHOST' s that start multiple dll's, I have not gone through them all, This process will take allot of time to do so) spoolsv.exe vmsrvc.exe ( Virtual Machine service) vpcmap.exe (Virtual Machine Service) alg.exe lsass.exe ctfmon.exe If anyone has created a working shell that works ( Replacing explorer.exe with your shell in the registry "see Above") Please let me know what you did to get it to work or even a sample script would be great. Any and everyone that even thinks something that may cause this issue please speek up. The Codemonkeyhttp://www.BMVHDloader.com Link to comment Share on other sites More sharing options...
Kendall Posted September 23, 2012 Author Share Posted September 23, 2012 (edited) I am revisiting this in hopes someone has some clue to why this is occurring. I would like it on windows 7 Embedded. It runs fine if you run it from taskmanager. ( issue; I dont have a keyboard to start it up evert time ) But not as startup or using the proper Shell replacement. [HKLMSoftwareMicrosoftWindows NTCurrentVersionWinlogon]Shell=“eShell.exe”The eShell.exe gets its parameters from this key.[HKLMSoftwareMicrosoftWindows EmbeddedEEFShell Launcher]ShellYou put the File Path of your custom shell. If your custom shell is in a folder included in the %PATH% environment variable, you have the option of just typing the name of your custom shell. Otherwise, you must type the full path of your custom shell.CustomReturnCodeActionConfigure the value for Action under CustomReturnCodeAction to define the behavior when a specific return code is encountered.AllOtherReturnCodeActionConfigure the value for Action under AllOtherReturnCodeAction to define the behavior when any other return code is encounteredSet the registry value for Action to configure the desired behavior: Value Description 0 Restart the custom shell. 1 Restart the device. 2 Turn off the device. 3 No action. http://technet.microsoft.com/en-us/library/hh300749(WinEmbedded.21).aspxRacking my Brain Edited September 23, 2012 by Kendall The Codemonkeyhttp://www.BMVHDloader.com Link to comment Share on other sites More sharing options...
BrewManNH Posted September 23, 2012 Share Posted September 23, 2012 My eyes are far too old to read that. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
Kendall Posted September 24, 2012 Author Share Posted September 24, 2012 (edited) Eureka!!!!!!!!!!!!! I found out what the issue is . In pretty much all of my code i use Example: Foldernamefilename.jpg& or filename.jpgthis points to the script directory. There is some dependency that is not loading in regards to where the script is running from when using it as a Windows Shell. In order to resolve the issue you need to have @scriptdir or the full path and file name of the Image. I don't remember there being @scriptdir in earlier versions on Autoit but it does work. Working Example as shell. #include #include #include issueTestForm1.kxf $Form1 = GUICreate("Form1", 801, 601, 192, 124) $Pic1 = GUICtrlCreatePic( @scriptdir & "Background.jpg", 0, 0, 800, 600) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Edited September 24, 2012 by Kendall The Codemonkeyhttp://www.BMVHDloader.com Link to comment Share on other sites More sharing options...
guinness Posted September 24, 2012 Share Posted September 24, 2012 OK, glad you worked it out. 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...
James Posted September 24, 2012 Share Posted September 24, 2012 You use the word "dependency" a lot, even when it's not dependency at all. I'm going to say this to you; developer to developer, man to man. You over complicated things. Next time, start simple - ignoring @ScriptDir is a common issue, if your image doesn't show, it's usually that you've got the location wrong, not that it's "dependency" on the HAL because you have 164 operating systems running on one computer - or whatever stuff you said. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ 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