Skorm Posted May 27, 2009 Share Posted May 27, 2009 I need some help with a script that i made expandcollapse popupIf FileExists("C:\Documents and Settings\TV op je PC") Then Msgbox(4, "Instalatie", "Hiermee verwijdert u TV op je PC van DirectMovie.nl, Wilt u Doorgaan? ") Run("C:\WINDOWS\system32\control.exe desk.cpl,@0,3?") ; Wait for the window to appear and become active WinWaitActive("Display Properties", "", 2) ; De toetsen die worden ingedrukt. Send("{TAB}") Send("{DOWN}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{SPACE}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{ENTER}") ; Now confirm the dialog box Send("{TAB}") Send("{ENTER}") DirRemove("C:\Documents and Settings\TV op je PC"), 1) Msgbox(0, "Instalatie", "TV op je PC van Directmovie.nl is Verwijdert") Else If FileExists("C:\Documents and Settings\TVopjePC") Then Run("C:\WINDOWS\system32\control.exe desk.cpl,@0,3?") ; Wait for the window to appear and become active WinWaitActive("Display Properties", "", 2) ; De toetsen die worden ingedrukt. Send("{TAB}") Send("{DOWN}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{SPACE}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{ENTER}") ; Now confirm the dialog box Send("{TAB}") Send("{ENTER}") DirRemove("C:\Documents and Settings\TVopjePC", 1) DirCreate("C:\Documents and Settings\TV op je PC") ; Verwijder CD error Msgbox(0, "Verwijder CD", "U Bent klaar, Druk op OK als u de CD heeft Verwijdert ") ; Zet startpagina RegDelete("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main", "Start Page") RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main", "Start Page", "REG_SZ", "http://www.directmovie.nl") ; Start Windows Internet Explorer Run ("C:\Program Files\Internet Explorer\iexplore.exe") WinWaitActive("Directmovie.nl - Online videotheek! De meeste films, film trailers en film details. - Microsoft Internet Explorer", "", 2) WinMove("Directmovie.nl - Online videotheek! De meeste films, film trailers en film details. - Microsoft Internet Explorer", "", 1500, 0, @DesktopWidth, @DesktopHeight) Sleep ( 10000 ) WinSetState ( 'Directmovie.nl - Online videotheek! De meeste films, film trailers en film details. - Microsoft Internet Explorer', '', @SW_MAXIMIZE ) ; Dan komt WMP Run ("C:\Program Files\Windows Media Player\wmplayer.exe") WinWaitActive("Windows Media Player", "", 2) WinMove("Windows Media Player", "", 1500, 0, @DesktopWidth, @DesktopHeight) Sleep ( 10000 ) Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{ENTER}") Sleep ( 10000 ) ; Dan het filmpje wat moet afspelen FileOpen ( "F:\intro.wmv", 0 ) Send("{LALT}") Send("{ENTER}") WinMove("Windows Media Player", "", 1500, 0, @DesktopWidth, @DesktopHeight) FileOpen ( "F:\intro.wmv", 0 ) Send("{LALT}") Send("{ENTER}") Msgbox(0, "DirectMovie", "U Bent klaar, Bedankt voor het gebruiken van PC op je TV ") Exit Else Msgbox(4, "Instalatie", "Hiermee installeert u TV op je PC van DirectMovie.nl, Wilt u Doorgaan? ") DirCreate("C:\Documents and Settings\TVopjePC") Msgbox(64, "Opnieuw Opstarten", "De computer zal nu opnieuw opstarten, Start na het opnieuw opstarten het TV op je PC bestand op de CD op ") exit EndIf Endif This script must expand your desktop if you have a 2nd screen attached. When this is done it must open internet explorer on the left screen then it must open windows media player, move media player to the 2nd monitor and play a movie on fullscreen I have a few problems I scripted it that if you open the .exe for the first time it will reboot the 2nd time it must adjust your sceen settings (expand desktop to 2nd monitor) the 3th time it must reset your computer back to 1 screen if i use it for the 3th time, i get an error of a parsline or something not beeing correct and also the intro.wmv does not play and Windows Media player stay's on the 1st screen Can someone help me with this ? Kind Regards Geoffrey Link to comment Share on other sites More sharing options...
Skorm Posted May 27, 2009 Author Share Posted May 27, 2009 bumb, sorry i am at work now, my boss wants me to do this, Can anyone help please ? Link to comment Share on other sites More sharing options...
Skorm Posted May 29, 2009 Author Share Posted May 29, 2009 2nd bumb, I saw many advanced scripts here, atleast someone should be able to help me. Can someone please help me out with this script ? regards Link to comment Share on other sites More sharing options...
Tec Posted May 29, 2009 Share Posted May 29, 2009 (edited) Test this for wmplayer: Global Const $SM_VIRTUALWIDTH = 78 Global Const $SM_VIRTUALHEIGHT = 79 $VirtualDesktopWidth = DLLCall("user32.dll", "int", "GetSystemMetrics", "int", $SM_VIRTUALWIDTH) $VirtualDesktopWidth = $VirtualDesktopWidth[0] $x_2 = $VirtualDesktopWidth - ($VirtualDesktopWidth/2) $intro = @SystemDir & "\oobe\images\intro.wmv" $pid = Run (@ProgramFilesDir & "\Windows Media Player\wmplayer.exe /fullscreen " & $intro, @SystemDir, @SW_MAXIMIZE) WinWaitActive("Windows Media Player","", 10) WinMove("Windows Media Player","", $x_2, 0)oÝ÷ Ùh)Z²ÉÚ殶sdWFôE6WD÷FöâgV÷CµvåFFÆTÖF6ÖöFRgV÷C²ÂB ¤vÆö&Â6öç7Bb33cµ4Õõd%ETÅtEDÒs¤vÆö&Â6öç7Bb33cµ4Õõd%ETÄTtBÒs¢b33cµf'GVÄFW6·F÷vGFÒDÄÄ6ÆÂgV÷C·W6W#3"æFÆÂgV÷C²ÂgV÷C¶çBgV÷C²ÂgV÷C´vWE77FVÔÖWG&72gV÷C²ÂgV÷C¶çBgV÷C²Âb33cµ4Õõd%ETÅtED¢b33cµf'GVÄFW6·F÷vGFÒb33cµf'GVÄFW6·F÷vGF³Ð¢b33c·ó"Òb33cµf'GVÄFW6·F÷vGFÒb33cµf'GVÄFW6·F÷vGFó" ¤Æö6Âb33c¶çG&òÒ77FVÔF"fײgV÷C²b3#¶öö&Rb3#¶ÖvW2b3#¶çG&òçv×bgV÷C° ¥'Vâ&öw&ÔfÆW4F"fײgV÷C²b3#µvæF÷w2ÖVFÆW"b3#·v×ÆW"æWRögVÆÇ67&VVâgV÷C²fײb33c¶çG&òÂ77FVÔF"Â5uôÔÔ¤R ¥våvD7FfRgV÷C¶6Æ76æÖSÕtÕÆW$gV÷C²ÂgV÷C²gV÷C²Â¥väÖ÷fRgV÷C¶6Æ76æÖSÕtÕÆW$gV÷C²ÂgV÷C²gV÷C²Âb33c·ó" Edited May 29, 2009 by Tec Link to comment Share on other sites More sharing options...
Skorm Posted May 29, 2009 Author Share Posted May 29, 2009 Thanks Tec! It worked Link to comment Share on other sites More sharing options...
Skorm Posted May 29, 2009 Author Share Posted May 29, 2009 Now im stuck with running an other script from the scriptdir in GUI Local $Button_1, $Button_2, $Button_3, $msg GUICreate("TV op je PC", 380, 280) ; will create a dialog box that when displayed is centered GuiSetIcon(@ScriptDir & "favicon.ico", 0) Opt("GUICoordMode", 2) $Button_1 = GUICtrlCreateButton("Installeer", 20, 30, 100) $Button_2 = GUICtrlCreateButton("Verwijder", 20, -1) $Button_3 = GUICtrlCreateButton("Sluiten", 20, -1) GUISetState() ; will display an dialog box with 2 button GUICtrlCreatePic("logo.jpg", -270, 50, 200, 100) ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Button_1 Run @scriptdir & ("Data01.exe") Case $msg = $Button_2 Run @ScriptDir & "Data03.exe") Case $msg = $Button_3 Exit Can someone fix my code please ? thats the only thing left i ahve to do now Thanks! Link to comment Share on other sites More sharing options...
Targus Posted May 29, 2009 Share Posted May 29, 2009 (edited) Run @ScriptDir & ("Data01.exe") should be Run (@ScriptDir & "Data01.exe") and so on Edited May 29, 2009 by Targus Link to comment Share on other sites More sharing options...
GEOSoft Posted May 29, 2009 Share Posted May 29, 2009 Correction to what Tarqus posted. Macros do not include the trailing backslash so it would be Run (@ScriptDir & "\Data01.exe") George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
Skorm Posted June 5, 2009 Author Share Posted June 5, 2009 (edited) Ok the whole program is done now, i made it for windows XP and for Windows Vista The problem is, Somehow the video isn't working no more! Global Const $SM_VIRTUALWIDTH = 78 Global Const $SM_VIRTUALHEIGHT = 79 $VirtualDesktopWidth = DLLCall("user32.dll", "int", "GetSystemMetrics", "int", $SM_VIRTUALWIDTH) $VirtualDesktopWidth = $VirtualDesktopWidth[0] $x_2 = $VirtualDesktopWidth - ($VirtualDesktopWidth/2) $intro = @ScriptDir & "intro.wmv" $pid = Run (@ProgramFilesDir & "\Windows Media Player\wmplayer.exe /fullscreen " & $intro, @SystemDir, @SW_MAXIMIZE) WinWaitActive("Windows Media Player","", 10) WinMove("Windows Media Player","", $x_2, 0) It opens Windows Media Player, it goed to the 2nd monitor but the video is not starting, most of the time it just gives an error! Kind Regards Edited June 5, 2009 by Skorm Link to comment Share on other sites More sharing options...
Tec Posted June 5, 2009 Share Posted June 5, 2009 Change $intro = @ScriptDir & "intro.wmv" to $intro = @ScriptDir & "\intro.wmv" 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