Advertisement
Guest User

Untitled

a guest
Oct 6th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 1.40 KB | None | 0 0
  1. #include <GUIConstantsEx.au3>
  2. #include <ButtonConstants.au3>
  3. Opt('MustDeclareVars', 1)
  4.  
  5. Global $zeit, $timer
  6.  
  7. convert()
  8.  
  9. Func convert()
  10.     Global $Button_1, $file,
  11.     Global $tab2, $tab2input, $msg, $zuf
  12.  
  13.  
  14.     GUICreate("conv",240,120)
  15.  
  16.     GUISetBkColor(0xFFFFFF)
  17.     GUISetFont(9, 300)
  18.  
  19.     $tab = GUICtrlCreateTab(10, 10, 180, 100)
  20.     $Button_1 = GUICtrlCreateButton(">", 200, 10, 30, 100)
  21.     $tab2 = GUICtrlCreateTabItem("Titel")
  22.     GUICtrlCreateLabel(".flv", 155, 50, 15, 20)
  23.     GUICtrlCreateLabel("Liedtitel wählen", 30, 80, 150, 20)
  24.     $tab2input = GUICtrlCreateInput("", 30, 50, 120, 20)
  25.  
  26.  
  27.     GUICtrlCreateTabItem("")
  28.  
  29.     GUISetState()
  30.  
  31.     While 1
  32.         $msg = GUIGetMsg()
  33.         Select
  34.             Case $msg = $GUI_EVENT_CLOSE
  35.                 ExitLoop
  36.             Case $msg = $Button_1
  37.  
  38.                 Local $name2 = Random(1, 10000000000, 1)
  39.                 $file = FileOpen($name2 & ".bat", 1)
  40.  
  41.                 If $file = -1 Then
  42.                     MsgBox(0, "Error", "Unable to open file.")
  43.                     Exit
  44.                 EndIf
  45.  
  46.                 FileWrite($file, 'fecl -a ')
  47.                 FileWrite($file, GUICtrlRead($tab2input))
  48.                 FileWrite($file, '.flv')
  49.  
  50.                 FileClose($file)
  51.  
  52.                 $timer = TimerInit()
  53.                 RunWait($name2 & ".bat")
  54.                 $zeit = TimerDiff($timer)
  55.                 MsgBox(64,"Information","Das Programm lief für " & $zeit & " Millisekunden")
  56.  
  57.                 FileDelete($name2 & ".bat")
  58.  
  59.                 FileDelete(@ScriptDir &"\*.flv")
  60.                 FileMove(@ScriptDir & "\*.mp3", @ScriptDir & "\Audio\", 9)
  61.  
  62.             Exit
  63.  
  64.         EndSelect
  65.     WEnd
  66. EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement