Hallo zusammen,
Ich hatte vor mit einer Gui meine FiniteElementeJobs zu starten und zu überwachen. Im Moment funktioniert alle Buttons außer die Jobkette, bei der soviele Jobs gestartet werden soll wie maximale Cpus vorher angegeben werden.
Es wird die richtige Anzahl von Jobs gestartet, aber danach friert die Gui ein. Das mag daran liegen, dass ich die Funktion durch eine While-schleife programmiert habe.
[autoit]$n=1
Func _startjob()
_checkeingabe()
$ifile=@scriptdir&"\inputlist.txt"
FileOpen($ifile,2)
_FileWriteFromArray($ifile,$FileListsarray)
$inputname =FileReadLine($ifile,1)
dim $name
$name=StringTrimRight ($inputname,4)
$stFile = @ScriptDir & "\standardlist.txt"
FileOpen($stfile,2)
$standardliste=processlist("svhost.exe")
_filewritefromarray($stfile,$standardliste)
$count_sta=0
$count_sta=filereadline($stfile,0)
_ArrayDelete($standardliste,0)
if ProcessExists("standard.exe") then $stacount=$stacount+($cpus*$count_sta)
$spFile = @ScriptDir & "\prelist.txt"
FileOpen($spfile,2)
$preliste=processlist("pre.exe")
_filewritefromarray($spfile,$preliste)
$count_pre=0
$count_pre=FileReadLine($ifile,0)
_ArrayDelete($preliste,0)
if ProcessExists("pre.exe") then $pre_count=$pre_count+$count_pre
;~ _ArrayAdd($jobs, $inputname)
;~ _FileWriteFromArray($stFile,$jobs)
;~ ShellExecute ($pfad_Abaqusexe, "job=" & $name & " Input=" & $pfad_input & "\" & $inputname & " cpus="&$cpus,$pfad_workdir1)
;~ WinWaitActive ($pfad_abaqusexe)
;~ sleep (2000)
;~ Send ($eingabe & "{ENTER}")
$precount=$precount+1+$stacount+$precount
_ArrayDelete($FileListsarray,0)
GUICtrlDelete($list_inputfiles)
$list_inputfiles = GUICtrlCreateList("", 220, 270, 160, 250)
GUICtrlSetData(-1, _ArrayToString($filelistsarray))
;~ Processwait("pre.exe")
;~
;~
;~ Endif
$precount = $precount+1;+$count_sta+$count_pre
MsgBox(0,"pre",$precount,1)
sleep(1500)
_getpid() ;geht
EndFunc
ich habe euch hier meine kompletten Quellcode mit 510 Zeilen eingefügt.
Spoiler anzeigen
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <Array.au3>
#include <GuiListView.au3>
#Include <File.au3>
#include <GUIListBox.au3>
#include <GuiConstantsEx.au3>
;~ While $eingabe=0
;~ $eingabe = InputBox("Eingabe 1", "Sollen alle vorigen Ergebnisse überschrieben werden?y oder n", "y", " M1", _
;~ -1, -1, 0, 0)
;~ if not $eingabe="n" then MsgBox (0,"","nur n oder y eingeben")
;~ if not $eingabe="y" then MsgBox (0,"","nur n oder y eingeben")
;~ if $eingabe="n" then $eingabe=1
;~ if $eingabe="y" then $eingabe=1
;~ WEnd
Local $Count_pre,$stacount,$pre_count,$count_sta,$listview_pid,$preliste,$preliste2,$standardliste,$standardliste2,$menu1,$pfad_input,$inputname, $list_inputfiles,$precount, $n2, $msg, $menustate, $menutext,$filelistsarray,$sfile,$stempfile,$jobs,$pre,$standard,$ifile
[/autoit] [autoit][/autoit] [autoit]GUICreate("Abaqusstartprogramm_HH",550,720) ; Erstellt ein GUI-Fenster welches mittig ausgerichtet wird
[/autoit] [autoit][/autoit] [autoit];~ Opt('MustDeclareVars', 1)
$cpumax1 = GUICtrlCreateInput("2", 184, 36, 21, 21,$ES_NUMBER& $ES_CENTER)
$cpus1 = GUICtrlCreateInput("1", 184, 66, 21, 21,$ES_NUMBER& $ES_CENTER)
$pfad_abaqusexe1 = GUICtrlCreateInput("D:\abaqus\6.9-3\exec\abq693.exe", 184, 96, 180, 21)
$pfad_input1 = GUICtrlCreateInput("C:\input", 184, 126, 180, 21)
$pfad_workdir2 = GUICtrlCreateInput("C:\Abaqusrechnungen", 184, 156, 180, 21)
;~ $listview_pid = GUICtrlCreateListView("Process Name ", 24, 236, 180, 385)
$listview_input = GUICtrlCreateListView("pausierte Prozesse|PID ", 220, 540, 160, 101)
;~ _GUICtrlListView_AddColumn($listview_input, "PID", 40)
;~ $listview_input_l = GUICtrlCreateLabel("pausierte Prozesse", 220, 520, 150, 200)
;~ $markiert_input = GUICtrlCreateInput("",220, 435, 150, 21)
[/autoit] [autoit][/autoit] [autoit]$pfad_abaqusexe=GUICtrlRead($pfad_abaqusexe1)
;~ MsgBox(0,"",$pfad_abaqusexe)
;~ $pfad_Abaqusexe="D:\abaqus\6.9-3\exec\abq693.exe"
$pfad_input=GUICtrlRead($pfad_input1)
;~ MsgBox(0,"",$pfad_input)
;~ $pfad_input="c:\input"
$pfad_workdir1=GUICtrlRead($pfad_workdir2)
;~ MsgBox(0,"",$pfad_workdir1)
;~ $pfad_workdir1="c:\abaqusrechnungen"
$cpumax=GUICtrlRead($cpumax1)
$cpus=GUICtrlRead($cpus1)
$cpumax_l = GUICtrlCreateLabel("CpuMax", 24, 40, 75, 17)
$cpus_l = GUICtrlCreateLabel("Cpus_pro_Rechnung", 24, 70, 145, 17)
$startordner_l = GUICtrlCreateLabel("Startordner", 24, 100, 75, 17)
$Inputordner_l = GUICtrlCreateLabel("Inputordner", 24, 130, 75, 17)
$pfad_workdir2_l = GUICtrlCreateLabel("Tempordner", 24, 160, 75, 17)
$Listview_pid_l = GUICtrlCreateLabel("Prozess in der Liste markieren", 24, 200, 110, 50)
$Listview_input_l = GUICtrlCreateLabel("Inputfiles vor dem starten markieren", 220, 200, 110, 30)
$markiert_int=GUICtrlCreateInput("",24, 620, 135, 21)
$markiert2_int=GUICtrlCreateInput("",160, 620, 44, 21)
$Checkbox1 = GUICtrlCreateInput("y", 184, 06, 21,0, $ES_CENTER)
$eingabe=GUICtrlRead($Checkbox1)
$Checkbox1_l = GUICtrlCreateLabel("Daten überschreiben", 24, 10,100,0)
$Button_neuladen = GUICtrlCreateButton("Neu laden", 130, 680, 74,21)
$Button_Fortsetzen = GUICtrlCreateButton("Resume", 130, 650, 74,21)
$Button_abbrechen = GUICtrlCreateButton("Prozess abbrechen", 24, 680, 100,21)
$Button_Pausieren = GUICtrlCreateButton("Pausieren" , 24, 650, 100,21)
$Button_helpcpumax = GUICtrlCreateButton("?", 150, 36, 21, 21, 0)
[/autoit] [autoit][/autoit] [autoit]$Button_beenden = GUICtrlCreateButton("Gui Schliessen", 424, 430, 100, 50,$BS_MULTILINE )
$Button_checki3 = GUICtrlCreateButton("Check", 130, 96, 41, 21)
$Button_checki4 = GUICtrlCreateButton("Check", 130, 126, 41, 21)
$Button_checki5 = GUICtrlCreateButton("Check", 130, 156, 41, 21)
$Button_refrehinputfiles = GUICtrlCreateButton("Inputfiles neu laden", 220, 235, 160,21)
$Button_jobstartenohnefilm = GUICtrlCreateButton("Job OHNE "&@CRLF&"Filmroutine starten", 424, 235,100,50,$BS_MULTILINE )
$Button_jobstartenmitfilm = GUICtrlCreateButton("Job MIT "&@CRLF&"Filmroutine starten", 424, 295,100,50,$BS_MULTILINE )
$button_jobkette = GUICtrlCreateButton("Jobkette starten", 424, 370, 100, 21,$BS_MULTILINE )
$button_delete = GUICtrlCreateButton("Eintrag entfernen", 424, 400, 100, 21)
$pfad_workdir_c = $pfad_workdir1 &"\Completed"
if not FileExists($pfad_workdir_c) then DirCreate($pfad_workdir_c)
$pfad_workdir_e = $pfad_workdir1&"\error"
if not FileExists($pfad_workdir_e) then DirCreate($pfad_workdir_e)
FileCreateShortcut($pfad_workdir_e,@DesktopDir & "\Jobs killed.lnk",@WindowsDir,"/e,c:\", "This is an Explorer link;-)", @SystemDir & "\shell32.dll", "^!t", "4", @SW_MINIMIZE)
FileCreateShortcut($pfad_workdir_c,@DesktopDir & "\Job Completed.lnk",@WindowsDir,"/e,c:\", "", @SystemDir & "\shell32.dll", "^!t", "4", @SW_MINIMIZE)
_checkinputfiles2()
_getPid()
_checkeingabe()
_checkaction()
_plist1()
;~ AdlibRegister("_checkinputfiles",1000)
;~ AdlibRegister("_checkeingabe",5000)
AdlibRegister("_checkaction",500)
AdlibRegister("_checkinput",500)
AdlibRegister("_getPid",4500)
AdlibRegister("_plist1",2500)
_getPid()
GUISetState()
$n=1
Func _startjob()
_checkeingabe()
$ifile=@scriptdir&"\inputlist.txt"
FileOpen($ifile,2)
$stFile = @ScriptDir & "\standardlist.txt"
FileOpen($stfile,2)
$spFile = @ScriptDir & "\prelist.txt"
FileOpen($spfile,2)
_FileWriteFromArray($ifile,$FileListsarray)
$preliste=processlist("preliste.exe")
_filewritefromarray($spfile,$preliste)
$standardliste=processlist("standardliste.exe")
_filewritefromarray($stfile,$standardliste)
$count_pre=FileReadLine($ifile,0)
$count_sta=filereadline($stfile,0)
_ArrayDelete($preliste,0)
_ArrayDelete($standardliste,0)
if ProcessExists("pre.exe") then $pre_count=$pre_count+$count_pre
if ProcessExists("standard.exe") then $stacount=$stacount+($cpus*$count_sta)
$inputname =FileReadLine($ifile,1)
;~ _ArrayAdd($jobs, $inputname)
;~ _FileWriteFromArray($stFile,$jobs)
dim $name
$name=StringTrimRight ($inputname,4)
ShellExecute ($pfad_Abaqusexe, "job=" & $name & " Input=" & $pfad_input & "\" & $inputname & " cpus="&$cpus,$pfad_workdir1)
WinWaitActive ($pfad_abaqusexe)
sleep (2000)
Send ($eingabe & "{ENTER}")
$precount=$precount+1+$stacount+$precount
_ArrayDelete($FileListsarray,0)
GUICtrlDelete($list_inputfiles)
$list_inputfiles = GUICtrlCreateList("", 220, 270, 160, 250)
GUICtrlSetData(-1, _ArrayToString($filelistsarray))
Processwait("pre.exe")
$count_pre=0
;~ $preliste=ProcessList("pre.exe")
;~ _FileWriteFromArray2D($spfile,$preliste)
;~ $count_pre = _FileCountLines($spfile)-1
;~ EndIf
;~ $count_sta=0
;~ if ProcessExists("standard.exe") then
;~ $standardliste=ProcessList("standard.exe")
;~ _FileWriteFromArray2D($stfile,$standardliste,1)
;~ $count_sta = _FileCountLines($stfile)*$cpus-1
;~ Endif
$precount = $precount+1;+$count_sta+$count_pre
MsgBox(0,"pre",$precount,1)
sleep(1500)
_getpid() ;geht
EndFunc
Func _checkinputfiles()
GUICtrlDelete($list_inputfiles)
$list_inputfiles = GUICtrlCreateList("", 220, 270, 160, 250)
;~ $filelistsarray=_FileListToArray($pfad_input,"*.inp")
$stempfile=@ScriptDir & "\filelisttemp.txt"
Fileopen($stempfile=@scriptdir&"\filelisttemp.txt",2)
_FileWriteFromArray($stempFile, $FileListsarray,1)
GUICtrlSetData(-1, _ArrayToString($filelistsarray), "Eintrag1")
EndFunc
Func _checkinputfiles2()
GUICtrlDelete($list_inputfiles)
$list_inputfiles = GUICtrlCreateList("", 220, 270, 160, 250)
$filelistsarray=_FileListToArray($pfad_input,"*.inp")
$sfile=@ScriptDir & "\filelistkomplett.txt"
_FileWriteFromArray($sFile, $FileListsarray,1)
_ArrayDelete($FileListsarray,0)
GUICtrlSetData(-1, _ArrayToString($filelistsarray), "Eintrag1")
EndFunc
Func _checkinput()
[/autoit] [autoit][/autoit] [autoit]$progname = _GUICtrlListView_GetItemTextString($listview_input)
$progname1 = StringSplit($progname, '|', 1)
$PID=$progname1[2]
$name=$progname1[1]
dim $pid
if $pid Then
GUICtrlSetData($markiert_int,$name)
;~ if $markiert<>"" then MsgBox(0,"",$markiert)
GUICtrlSetData($markiert2_int,$PID)
EndIf
EndFunc
Func _checkeingabe()
$eingabe=GUICtrlRead($checkbox1)
$cpumax=GUICtrlRead($cpumax1)
$cpus=GUICtrlRead($cpus1)
if $cpus > $cpumax then
GUICtrlSetData($cpus1,$cpumax)
msgbox(0,"Fehler","Es können nicht mehr Cpus pro Rechnung verwendet werden als in CpuMax angegeben")
Endif
$pfad_abaqusexe=GUICtrlRead($pfad_abaqusexe1)
$pfad_input=GUICtrlRead($pfad_input1)
$pfad_workdir1=GUICtrlRead($pfad_workdir2)
if not FileExists($pfad_abaqusexe) then
$abqexist = InputBox("Folder not Exists","Ordner existiert nicht!"&@CRLF&@CRLF&"Soll der Ordner erstellt werden?","n")
if $abqexist="y" Then
DirCreate($pfad_abaqusexe)
;~ $FileList_to_array =_FileListToArray($pfad_abaqusexe)
;~ FileCreateShortcut($pfad_abaqusexe,@DesktopDir & "\Input.lnk",@WindowsDir,"/e,c:\", "This is an Explorer link;-)", @SystemDir & "\shell32.dll", "^!t", "4", @SW_MINIMIZE)
EndIf
EndIf
if not FileExists($pfad_input) then
$folderexist = InputBox("Folder not Exists","Ordner existiert nicht!"&@CRLF&@CRLF&"Soll der Ordner erstellt werden?","n")
if $folderexist="y" Then
DirCreate($pfad_input)
;~ $FileList_to_array =_FileListToArray($pfad_input)
FileCreateShortcut($pfad_input,@DesktopDir & "\Input.lnk",@WindowsDir,"/e,c:\", "This is an Explorer link;-)", @SystemDir & "\shell32.dll", "^!t", "4", @SW_MINIMIZE)
EndIf
EndIf
if not FileExists($pfad_workdir1) then
$workdirexist = InputBox("Folder not Exists","Ordner existiert nicht!"&@CRLF&@CRLF&"Soll der Ordner erstellt werden?","n")
if $workdirexist="y" Then
DirCreate($pfad_workdir1)
FileCreateShortcut($pfad_workdir1,@DesktopDir & "\Abaqusrechnungen.lnk",@WindowsDir,"/e,c:\", "", @SystemDir & "\shell32.dll", "^!t", "4", @SW_MINIMIZE)
EndIf
EndIf
if Fileexists(@DesktopDir & "\Abaqusrechnungen.lnk") Then FileCreateShortcut($pfad_workdir1,@DesktopDir & "\Abaqusrechnungen.lnk",@WindowsDir,"/e,c:\", "", @SystemDir & "\shell32.dll", "^!t", "4", @SW_MINIMIZE)
if Fileexists(@DesktopDir & "\Input.lnk") Then FileCreateShortcut($pfad_input,@DesktopDir & "\Input.lnk",@WindowsDir,"/e,c:\", "This is an Explorer link;-)", @SystemDir & "\shell32.dll", "^!t", "4", @SW_MINIMIZE)
EndFunc
Func _checkaction()
$clicknumber=_GUICtrlListBox_GetCurSel($list_inputfiles)
$progname_ac = _GUICtrlListView_GetItemTextString($listview_pid)
$progname1_ac = StringSplit($progname_ac, '|', 1)
$PID_ac=$progname1_ac[2]
$name_ac=$progname1_ac[1]
dim $pid_ac
if $PID_ac Then
GUICtrlSetData($markiert_int,$name_ac)
;~ if $markiert<>"" then MsgBox(0,"",$markiert)
GUICtrlSetData($markiert2_int,$PID_ac)
EndIf
EndFunc
Func _startjobkette()
While 1
sleep(1000)
if $precount < $CpuMax then ;läuft
_startjob()
EndIf
if $precount >= $cpumax Then
if ProcessExists("standard.exe") Then
$precount=$precount-1+$cpus
MsgBox(0,"pre",$precount,1)
;~ if $precount>$cpumax Then
$standardliste_pid=_arraytostring($standardliste,"",1)
dim $PID_sta
$PID_sta=StringTrimLeft($standardliste_pid,12)
;~ ShellExecute (@ScriptDir & "\pausep.exe ", $standardliste_pid)
;~ $precount=$precount-$cpus
MsgBox(0,"pre",$PID_sta,1)
;~ EndIf
;~ if ProcessWaitClose("standard.exe") then $precount=$precount-$cpus
EndIf
EndIf
If $msg = $Button_beenden Then $msg = $GUI_EVENT_CLOSE
if $msg = $GUI_EVENT_CLOSE then Exit
;~ pausiert alle "standard.exe"
;~ if $standardliste="1" Then
;~ $standardliste_Pid = $standardliste[1][1]
;~ msgbox(0,"standard_pid",$standardliste_Pid)
;~ ShellExecute (@ScriptDir & "\pausep.exe ", $standardliste_Pid)
;~ EndIf
;~ bis ProcessClose("pre.exe")
;~ if processclose ("pre.exe")
if $inputname="" then ExitLoop
WEnd
EndFunc
[/autoit] [autoit][/autoit] [autoit]Func _getPid()
Local $ar_pause
_GUICtrllistview_Destroy($listview_pid)
$listview_pid = GUICtrlCreateListView("Process Name ", 24, 236, 180, 385)
;~ $listview_input = GUICtrlCreateListView("Inputfiles ", 220, 436, 150, 200)
_GUICtrlListView_DeleteAllItems($listview_pid)
_GUICtrlListView_DeleteAllItems($listview_input)
_GUICtrlListView_AddColumn($listview_pid, "PID ", 50)
;~ _GUICtrlListView_AddColumn($listview_input, "PID", 40)
;~ $plist = ProcessList()
;~ local $plist
local $preliste=ProcessList("pre.exe")
_ArrayDelete($preliste,0)
local $standardliste=ProcessList("standard.exe")
_ArrayDelete($standardliste,0)
dim $name,$pid
;~ ~ $ar_pause = $name & $pid
;~
;~ _ArrayDelete($plist,0)
_GUICtrlListView_DeleteAllItems(GUICtrlGetHandle($preliste))
_GUICtrlListView_DeleteAllItems(GUICtrlGetHandle($standardliste))
_GUICtrlListView_DeleteAllItems(GUICtrlGetHandle($ar_pause))
;~ _GUICtrlListView_AddArray($listview_pid, $plist)
_GUICtrlListView_AddArray($listview_pid,$standardliste)
_GUICtrlListView_AddArray($listview_pid,$preliste)
_GUICtrlListView_AddArray($listview_input, $ar_pause)
;~ _GUICtrlListView_DeleteItem(GUICtrlGetHandle($standardliste), 0)
;~ _GUICtrlListView_DeleteItem(GUICtrlGetHandle($preliste),0)
_GUICtrlListView_DeleteItem(GUICtrlGetHandle($ar_pause), 0)
;~ GUICtrlCreateListViewItem($plist, $listview_pid)
GUICtrlCreateListViewItem($standardliste, $listview_pid)
GUICtrlCreateListViewItem($preliste, $listview_pid)
GUICtrlCreateListViewItem($ar_pause, $listview_input)
;~ _plist()
EndFunc
Func _plist()
local $preliste2=ProcessList("pre.exe")
_ArrayDelete($preliste2,0)
$preliste = $preliste2
local $standardliste2=ProcessList("standard.exe")
_ArrayDelete($standardliste2,0)
$standardliste=$standardliste2
EndFunc
Func _plist1()
[/autoit] [autoit][/autoit] [autoit]local $preliste=ProcessList("pre.exe")
_ArrayDelete($preliste,0)
If not $preliste2 = $preliste then
$preliste2 = $preliste
_getpid()
Endif
;~ _plist()
local $standardliste=ProcessList("standard.exe")
_ArrayDelete($standardliste,0)
If not $standardliste2 = $standardliste then
$standardliste2 = $standardliste
_getpid()
Endif
_plist()
EndFunc
$1=0; Zeigt das leere GUI-Fenster
$a=1 ; Führt das GUI aus, bis der Dialog geschlossen wird
while $a=1
$msg = GUIGetMsg()
If $msg = $button_delete Then
_ArrayDelete($FileListsarray,_GUICtrlListBox_GetCurSel($list_inputfiles))
GUICtrlDelete($list_inputfiles)
$list_inputfiles = GUICtrlCreateList("", 220, 270, 160, 250)
GUICtrlSetData(-1, _ArrayToString($filelistsarray), "Eintrag1")
EndIf
If $msg = $Button_jobstartenohnefilm Then
_checkeingabe()
$inputname = Guictrlread($list_inputfiles)
dim $name
$name=StringTrimRight($inputname,4)
ShellExecute ($pfad_Abaqusexe, "job="&$name&" Input="& $pfad_input&"\" & $inputname & " cpus="&$cpus,$pfad_workdir1)
WinWaitActive($pfad_abaqusexe)
Send($eingabe & "{ENTER}" )
_ArrayDelete($FileListsarray,_GUICtrlListBox_GetCurSel($list_inputfiles))
GUICtrlDelete($list_inputfiles)
$list_inputfiles = GUICtrlCreateList("", 220, 270, 160, 250)
GUICtrlSetData(-1, _ArrayToString($filelistsarray), "Eintrag1")
EndIf
If $msg = $Button_jobstartenMitFilm Then
_checkeingabe()
$inputname = Guictrlread($list_inputfiles)
dim $film_mcrr_radial_for
$film_mcrr_radial_for = $pfad_workdir1 & "\" & "film_mcrr.radial.for"
ShellExecute ($pfad_Abaqusexe, "j=" & $inputname & " user="& $film_mcrr_radial_for & " cpus="&$cpus,$pfad_workdir1)
sleep(3000)
Send($eingabe&"{ENTER}")
if processexists ("python.exe") Then _ArrayDelete($FileListsarray,_GUICtrlListBox_GetCurSel($list_inputfiles))
GUICtrlDelete($list_inputfiles)
$list_inputfiles = GUICtrlCreateList("", 220, 270, 160, 250)
GUICtrlSetData(-1, _ArrayToString($filelistsarray), "Eintrag1")
EndIf
If $msg = $Button_refrehinputfiles Then
_checkinputfiles2()
EndIf
If $msg = $Button_checki3 Then
$pfad_abaqusexe=GUICtrlRead($pfad_abaqusexe1)
if not FileExists($pfad_abaqusexe) then
$abqexist = InputBox("Folder not Exists","Ordner existiert nicht!"&@CRLF&@CRLF&"Soll der Ordner erstellt werden?","n")
if $abqexist="y" Then
DirCreate($pfad_abaqusexe)
$FileList_to_array =_FileListToArray($pfad_abaqusexe)
FileCreateShortcut($pfad_abaqusexe,@DesktopDir & "\Input.lnk",@WindowsDir,"/e,c:\", "This is an Explorer link;-)", @SystemDir & "\shell32.dll", "^!t", "4", @SW_MINIMIZE)
EndIf
EndIf
EndIf
If $msg = $Button_checki4 Then
$pfad_input=GUICtrlRead($pfad_input1)
if not FileExists($pfad_input) then
$folderexist = InputBox("Folder not Exists","Ordner existiert nicht!"&@CRLF&@CRLF&"Soll der Ordner erstellt werden?","n")
if $folderexist="y" Then
DirCreate($pfad_input)
$FileList_to_array =_FileListToArray($pfad_input)
FileCreateShortcut($pfad_input,@DesktopDir & "\Input.lnk",@WindowsDir,"/e,c:\", "This is an Explorer link;-)", @SystemDir & "\shell32.dll", "^!t", "4", @SW_MINIMIZE)
EndIf
EndIf
EndIf
If $msg = $Button_checki5 Then
$pfad_workdir1=GUICtrlRead($pfad_workdir2)
if not FileExists($pfad_workdir1) then
$workdirexist = InputBox("Folder not Exists","Ordner existiert nicht!"&@CRLF&@CRLF&"Soll der Ordner erstellt werden?","n")
if $workdirexist="y" Then
DirCreate($pfad_workdir1)
$FileList_to_array =_FileListToArray($pfad_workdir1)
FileCreateShortcut($pfad_workdir1,@DesktopDir & "\Input.lnk",@WindowsDir,"/e,c:\", "This is an Explorer link;-)", @SystemDir & "\shell32.dll", "^!t", "4", @SW_MINIMIZE)
EndIf
EndIf
EndIf
If $msg = $Button_helpcpumax Then
ShellExecute ("dxdiag")
EndIf
If $msg = $Button_abbrechen Then
$markiert=GUICtrlRead($markiert_int)
ProcessClose($markiert)
EndIf
If $msg = $Button_neuladen Then _getpid()
If $msg = $Button_Pausieren Then
$1=$1+1
$markiert2=GUICtrlRead($markiert2_int)
ShellExecute (@ScriptDir & "\pausep.exe ", $markiert2)
$progname_ac = _GUICtrlListView_GetItemTextString($listview_pid)
$progname1_ac = StringSplit($progname_ac, '|', 0)
$PID_ac=$progname1_ac[2]
$name_ac=$progname1_ac[1]
_GUICtrlListView_addItem($listview_input,$name_ac)
_GUICtrlListView_addSubItem($listview_input,$1,$pid_ac,1)
EndIf
If $msg = $Button_Fortsetzen Then
if $1<0 then $1=1
ShellExecute (@ScriptDir & "\pausep.exe", $markiert2 & " /r")
$1=$1+1
$markiert2=GUICtrlRead($markiert2_int)
$progname_ac = _GUICtrlListView_GetItemTextString($listview_pid)
$progname1_ac = StringSplit($progname_ac, '|', 0)
$PID_ac=$progname1_ac[2]
$name_ac=$progname1_ac[1]
_GUICtrlListView_addItem($listview_input,"Resume")
_GUICtrlListView_addSubItem($listview_input,$1,$pid_ac,1)
EndIf
If $msg = $Button_beenden Then $msg = $GUI_EVENT_CLOSE
;Jobschleife
if $msg=$button_jobkette Then
;~ $cpuInUse=1
_startjobkette()
EndIf
;~ dann standard.exe nacheinander weiterrechnen, wenn $cpu=$CpuMax
;~ schleife möglich
if $msg = $GUI_EVENT_CLOSE then $a=-1
WEnd