SWB Posted February 27, 2012 Posted February 27, 2012 I've been running this batch program from autoit, which runs fine but, want to run completely from autoit.RUN DVDFAB IN ISO MODE (G).txt
Guest Posted February 27, 2012 Posted February 27, 2012 (edited) Explain more.I've been running this batch program from autoit, which runs fine but, want to run completely from autoit.Do you want to create a full AutoIt Script by running a bat file."How do I pass this to my program, so when my program opens I get this result after it runs"Do you want to create a console app where you will send switches to it. Edited February 27, 2012 by Guest
DW1 Posted February 27, 2012 Posted February 27, 2012 I was also confused by the wording. Perhaps this can help get you started? #include <GUIConstantsEx.au3> Opt('MustDeclareVars', 1) Global $Program = 'C:Program FilesDVDFab 8 Qt' Dim $msg, $fsf Dim $guiHandle = GUICreate("Run DVDFAB", 200, 150) GUICtrlCreateLabel('Destination:' , 5, 5, 190) Dim $Dest = GUICtrlCreateInput("", 5, 20, 165) Dim $Folder = GUICtrlCreateButton( '...', 170, 19, 25, 22) GUICtrlCreateLabel('Year:' , 5, 45, 190) Dim $Year = GUICtrlCreateInput("", 5, 60, 190) GUICtrlCreateLabel('Name:' , 5, 85, 190) Dim $Name = GUICtrlCreateInput("", 5, 100, 190) Dim $dvdfabbutton = GUICtrlCreateButton("Run DVDFab", 5, 125, 75) Dim $exitbutton = GUICtrlCreateButton("Exit", 120, 125, 75) GUISetState(@SW_SHOW, $guiHandle ) While 1 $msg = GUIGetMsg($guiHandle ) Select Case $msg == $GUI_EVENT_CLOSE Or $msg = $exitbutton Exit Case $msg == $Folder $fsf = FileSelectFolder('Choose destination folder','') If Not @error Then GUICtrlSetData($Dest, $fsf) Case $msg == $dvdfabbutton RunWait(@ComSpec & " /c " & $Program & 'dvdfab.exe /mode "mainmovie" /src "g:" /dest "' & GUICtrlRead($Dest) & '' & GUICtrlRead($Name) & ' (' & GUICtrlRead($Year) & ')' & GUICtrlRead($Name) & ' (' & GUICtrlRead($Year) & ').iso" /DISPLAYFORCEDSUB "Yes" /Title "auto" /removemenu "yes" /removepgc "yes" /outdisc "dvd9" /close') MsgBox(0,'Done',$Program & 'dvdfab.exe /mode "mainmovie" /src "g:" /dest "' & GUICtrlRead($Dest) & '' & GUICtrlRead($Name) & ' (' & GUICtrlRead($Year) & ')' & GUICtrlRead($Name) & ' (' & GUICtrlRead($Year) & ').iso" /DISPLAYFORCEDSUB "Yes" /Title "auto" /removemenu "yes" /removepgc "yes" /outdisc "dvd9" /close') Case Default EndSelect WEnd AutoIt3 Online Help
SWB Posted February 27, 2012 Author Posted February 27, 2012 I get this as output %DEST%%SHOW% (%YEAR%)%SHOW% (%YEAR%).ISO From this: #cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.8.1 Author: Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- ;Script Start - Add your code below here $answer = InputBox("Question", "What Is The Film Destination?","C:Movies", "") $filmyear = InputBox("Film Year", "Please Enter The Film Year") $filmname = InputBox("Film Name", "Please Enter The Film Name") #include <GUIConstantsEx.au3> Opt('MustDeclareVars', 1) Dim $msg Dim $guiHandle = GUICreate("Run DVDFAB", 200, 60) Dim $blurbLabel = GUICtrlCreateLabel("Enter Your Choice", 5, 5) Dim $dvdfabbutton = GUICtrlCreateButton("Run DVDFab", 5, 30, 75) Dim $exitbutton = GUICtrlCreateButton("Exit", 120, 30, 75) GUISetState(@SW_SHOW, $guiHandle ) While 1 $msg = GUIGetMsg($guiHandle ) Select Case $msg == $GUI_EVENT_CLOSE Or $msg = $exitbutton Exit Case $msg == $dvdfabbutton ;do dvdfab ;******************************************************************** ;RunWait(@COMSPEC & " /c Start fabisog.exe") ; THIS WORKS ;******************************************************************** ;ShellExecuteWait("fabisog.exe") ; THIS WORKS ;******************************************************************** RunWait('"C:Program FilesDVDFab 8 QtDVDFab.exe" /mode "mainmovie" /src "g:" /dest "%dest%%show% (%year%)%show% (%year%).iso" /DISPLAYFORCEDSUB "Yes" /Title "auto" /removemenu "yes" /removepgc "yes" /outdisc "dvd5" /close"') ; THIS WORKS MsgBox(0,"Debug","Program is done!") ;RunWait("fabisog.exe") ; THIS WORKS ;MsgBox(0,"Debug","Program is done!") ;******************************************************************** ;RunWait(@COMSPEC & " /c Start fabisog.exe") ; THIS WORKS ;******************************************************************** ;RunWait("fabisog.exe") ; THIS WORKS ;MsgBox(0,"Debug","Program is done!") ;******************************************************************** Case Default EndSelect WEnd I want to end up wih this D:MOVIESMURDER BY DEATH (1980)MURDER_BY_DEATH.ISO Thanks,
SWB Posted February 27, 2012 Author Posted February 27, 2012 I was also confused by the wording. Perhaps this can help get you started? #include <GUIConstantsEx.au3> Opt('MustDeclareVars', 1) Global $Program = 'C:Program FilesDVDFab 8 Qt' Dim $msg, $fsf Dim $guiHandle = GUICreate("Run DVDFAB", 200, 150) GUICtrlCreateLabel('Destination:' , 5, 5, 190) Dim $Dest = GUICtrlCreateInput("", 5, 20, 165) Dim $Folder = GUICtrlCreateButton( '...', 170, 19, 25, 22) GUICtrlCreateLabel('Year:' , 5, 45, 190) Dim $Year = GUICtrlCreateInput("", 5, 60, 190) GUICtrlCreateLabel('Name:' , 5, 85, 190) Dim $Name = GUICtrlCreateInput("", 5, 100, 190) Dim $dvdfabbutton = GUICtrlCreateButton("Run DVDFab", 5, 125, 75) Dim $exitbutton = GUICtrlCreateButton("Exit", 120, 125, 75) GUISetState(@SW_SHOW, $guiHandle ) While 1 $msg = GUIGetMsg($guiHandle ) Select Case $msg == $GUI_EVENT_CLOSE Or $msg = $exitbutton Exit Case $msg == $Folder $fsf = FileSelectFolder('Choose destination folder','') If Not @error Then GUICtrlSetData($Dest, $fsf) Case $msg == $dvdfabbutton RunWait(@ComSpec & " /c " & $Program & 'dvdfab.exe /mode "mainmovie" /src "g:" /dest "' & GUICtrlRead($Dest) & '' & GUICtrlRead($Name) & ' (' & GUICtrlRead($Year) & ')' & GUICtrlRead($Name) & ' (' & GUICtrlRead($Year) & ').iso" /DISPLAYFORCEDSUB "Yes" /Title "auto" /removemenu "yes" /removepgc "yes" /outdisc "dvd9" /close') MsgBox(0,'Done',$Program & 'dvdfab.exe /mode "mainmovie" /src "g:" /dest "' & GUICtrlRead($Dest) & '' & GUICtrlRead($Name) & ' (' & GUICtrlRead($Year) & ')' & GUICtrlRead($Name) & ' (' & GUICtrlRead($Year) & ').iso" /DISPLAYFORCEDSUB "Yes" /Title "auto" /removemenu "yes" /removepgc "yes" /outdisc "dvd9" /close') Case Default EndSelect WEnd I Thank You, This what I was looking for, short and sweet, I guess I took the long way around. What I was doing was trying to read from the inputbox, which doesn't look like you can do, Thanks Again, Regards' SWB
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