mir wurde berichtet das das Tool was unten im Spoiler ist nicht richtig unter Win 8.1 funktioniert.
Code:
#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=data\Backround\bbo.ico #AutoIt3Wrapper_Outfile=Handelstool.exe #AutoIt3Wrapper_Outfile_x64=Handelstool.exe #AutoIt3Wrapper_UseUpx=n #AutoIt3Wrapper_UseX64=y #AutoIt3Wrapper_Res_Fileversion=1.1.0.0 #AutoIt3Wrapper_Res_LegalCopyright= #AutoIt3Wrapper_Res_Language=1031 #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <GuiListView.au3> #include <ListviewConstants.au3> #include <EditConstants.au3> #include <ListboxConstants.au3> #include <INet.au3> Opt("GUIOnEventMode", 1) $Form1 = GUICreate("WarenHandelsTool", 750, 330, 520, 10) GUISetOnEvent($GUI_EVENT_CLOSE, "close") GUISetOnEvent($GUI_EVENT_MINIMIZE, "minimizeForm1") $PicPet = GUICtrlCreatePic(@Scriptdir & "\data\Backround\Stormdevil.tgx", 0, 0, 750, 330) GUICtrlSetState($PicPet, $GUI_DISABLE) WinSetOnTop($Form1, "", 1) Global $version = "1.1" Global $fileName = "data\ini\StaedteHandelstool.ini" Global $fileNameWare = "data\ini\Waren.ini" Dim $towns = getTowns() Dim $ware = getWare() $titel = "Neue Runde es ist genug Zeit" $titel1 = "Achtung, die Zeit wird knapp" $DauerStd = 1 $DauerMin = 12 $DauerSek = 00 Global $DauerGesammt = (60 * 60 * $DauerStd) + (60 * $DauerMin) + $DauerSek Global $comboAmountWare = 1 Global $comboAmount = 10 Dim $combosLeft[$comboAmount][2] Dim $combosRight[$comboAmount] Dim $comboware [$comboAmountWare][2] Dim $comboware1 [$comboAmountWare][2] Opt("GUIOnEventMode", 1) $Label1 = GUICtrlCreateLabel("", 535, 113, 205, 22) GUICtrlSetData($Label1, StringFormat("%02d Std %02d Min %02d Sek", $DauerStd, $DauerMin, $DauerSek)) GUICtrlSetFont(-1, 14, 600) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) GUICtrlSetColor($Label1, 0xF0F8FF) $Button1 = GUICtrlCreateButton("Timer-Start", 585, 146, 100, 21, $BS_CENTER) GUICtrlSetOnEvent(-1, "ButtonTimer1") $Button2 = GUICtrlCreateButton("Timer-Stop/Reset", 585, 146, 100, 21, $BS_CENTER) GUICtrlSetOnEvent(-1, "ButtonTimer2") GUICtrlSetState($Button2, $GUI_HIDE) $Button3 = GUICtrlCreateButton("Alles Löschen", 585, 300, 100, 21, $BS_CENTER) GUICtrlSetOnEvent(-1, "GuiLoeschen") Global $hList = GUICtrlCreateList("", 528, 25, 210, 85, $LBS_SORT, $WS_EX_OVERLAPPEDWINDOW) GUICtrlSetOnEvent($hList, "itemClicked") GUICtrlSetState($hList, $GUI_HIDE) Global $wList = GUICtrlCreateList("", 542, 211, 180, 75, $LBS_SORT, $WS_EX_OVERLAPPEDWINDOW) GUICtrlSetState($wList, $GUI_HIDE) GUICtrlCreateLabel("Von Stadt", 20, 4, 95, 17, $SS_CENTER) GUICtrlSetFont(-1, 12, 600) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) GUICtrlSetColor(-1, 0xFFE4C4) GUICtrlCreateLabel("Nach Stadt", 420, 4, 95, 17, $SS_CENTER) GUICtrlSetFont(-1, 12, 600) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) GUICtrlSetColor(-1, 0x000000) Global $currentLabel #region Combos Stadtauswahl Local $abstand = 30 For $i = 0 To $comboAmount - 1 $combosLeft[$i][0] = createCombo(20, 25 + $i * $abstand, 95, 25) $combosLeft[$i][1] = GUICtrlCreateLabel("", 118, 27 + $i * $abstand, 300, 30, $SS_CENTER) GUICtrlSetFont(-1, 11, 600) GUICtrlSetColor(-1, 0x000000) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) $combosRight[$i] = createCombo(420, 25 + $i * $abstand, 95, 25) GUICtrlSetOnEvent($combosLeft[$i][0], "comboChanged") GUICtrlSetOnEvent($COMBOSRIGHT[$I], "DummyChange") ;===> Setzt bei klick Focus auf die Combo $COMBOWARE Next #endregion Combos Stadtauswahl #region Combos Warenauswahl Local $abstand = 30 For $i = 0 To $comboAmountWare - 1 $comboware[$i][0] = createComboo(523, 175 + $i * $abstand, 220, 25) $comboware1[$i][1] = GUICtrlCreateLabel("", 250, 10 + $i * $abstand, 100, 15, $SS_LEFT) GUICtrlSetState(-1, $GUI_HIDE) GUICtrlSetOnEvent($comboware[$i][0], "comboChangedd") Next #endregion Combos Warenauswahl GUISetState(@SW_SHOW) ; Opt("GUIOnEventMode", 1) $Form2 = GUICreate("Form2", 50, 43, 10, 220, $WS_POPUP) GUISetOnEvent($GUI_EVENT_CLOSE, "close") GUISetOnEvent($GUI_EVENT_MINIMIZE, "minimizeForm2") $PicPet1 = GUICtrlCreatePic(@Scriptdir & "\data\Backround\Handelstoolpic.tgx", 0, 0, 50, 43) GUICtrlSetState($PicPet1, $GUI_DISABLE) GUICtrlCreateButton("Handel",5,13,40,18) GUICtrlSetOnEvent(-1, "minimizeForm2") GUISetState(@SW_SHOW) GUISetState(@SW_MINIMIZE) #region Function Updatecheck InetGet("http://www.bboalmanach.de/HandelsToolUpdate/update.txt", @Scriptdir & "\data\update.txt", 1, 0) $file = FileOpen(@Scriptdir & "\data\update.txt", 0) $line = FileReadLine($file, 1) If $line = $version Then FileClose($file) Else $fg = MsgBox(20, "Es ist eine neue Version vorhanden!", "Möchtest du jetzt Updaten?") If $fg = 6 Then InetGet("http://www.bboalmanach.de/HandelsToolUpdate/updatetest/HandelsTool.exe", @ScriptDir & "\Update\HandelsTool.exe", 1, 0) MsgBox(1, "Update abgeschlossen", "Aktuelle Version (" & $version & ")", 2) FileClose($file) Run(@ScriptDir & "\Update\HandelsTool.exe") Sleep(1500) Exit EndIf EndIf #endregion Function Updatecheck While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Sleep(4000) EndSwitch WEnd #region Func Combos Stadt Func close() _log("Closing programm") Exit EndFunc Func minimizeForm1() GUISetState(@SW_RESTORE, $Form2) WinSetOnTop($Form2, "", 1) EndFunc Func minimizeForm2() GUISetState(@SW_RESTORE, $Form1) GUISetState(@SW_MINIMIZE, $Form2) WinSetOnTop($Form1, "", 1) EndFunc Func DummyChange();Hier wird der Focus auf die Combo $COMBOWARE[0][0] gesetzt wenn eine Auswahl in den Combos Nach Stadt ausgewählt wurde GUICtrlSetState($WLIST, $GUI_FOCUS) EndFunc ;==>DummyChange Func getTowns() _log("Reading section names..") Local $sectioNames = IniReadSectionNames($fileName) If (@error) Then Local $errorMsg = "Could not open file '" & $fileName & "'." _log($errorMsg, True) MsgBox(0, "Error", $errorMsg) Return -1 EndIf _log("Read " & $sectioNames[0] & " section names.") Return $sectioNames EndFunc Func getItems($town) Local $items = IniReadSection($fileName, $town) If (@error) Then Local $errorMsg = "Could not read section '" & $town & "'." _log($errorMsg, True) MsgBox(0, "Error", $errorMsg) Return -1 EndIf Local $itemAmount = $items[0][0] _log("Found '" & $itemAmount & "' items for town '" & $town & "'.") Local $availableItems For $i = 1 To $itemAmount $availableItems &= $items[$i][0] If ($i < $itemAmount) Then $availableItems &= "|" Next Return $availableItems EndFunc #endregion Func Combos Stadt #region Func Combos Waren Func closet() _loge("Closing program") Exit EndFunc Func getWare() _loge("Reading section names..") Local $sectioNamesWare = IniReadSectionNames($fileNameWare) If (@error) Then Local $errorMsg = "Could not open file '" & $fileNameWare & "'." _loge($errorMsg, True) MsgBox(0, "Error", $errorMsg) Return -1 EndIf _loge("Read " & $sectioNamesWare[0] & " section names.") Return $sectioNamesWare EndFunc Func getWareitems($ware) Local $itemss = IniReadSection($fileNameWare, $ware) If (@error) Then Local $errorMsg = "Could not read section '" & $ware & "'." _loge($errorMsg, True) MsgBox(0, "Error", $errorMsg) Return -1 EndIf Local $itemAmountt = $itemss[0][0] _loge("Found '" & $itemAmountt & "' items for town '" & $ware & "'.") Local $availableItemss For $i = 1 To $itemAmountt $availableItemss &= $itemss[$i][0] If ($i < $itemAmountt) Then $availableItemss &= "|" Next Return $availableItemss EndFunc #endregion Func Combos Waren Func createCombo($x, $y, $width, $height) Local $string For $i = 2 To $towns[0] $string &= $towns[$i] If ($i < $towns[0]) Then $string &= "|" Next $combo = GUICtrlCreateCombo($towns[1], $x, $y, $width, $height, BitOR($CBS_SORT, $CBS_AUTOHSCROLL, $CBS_DROPDOWNLIST, $WS_VSCROLL)) GUICtrlSetData(-1, $string, "") GUICtrlSetState(-1, $GUI_NOFOCUS) Return $combo EndFunc Func createComboo($x, $y, $width, $height) Local $string For $i = 2 To $ware[0] $string &= $ware[$i] If ($i < $ware[0]) Then $string &= "|" Next $combo = GUICtrlCreateCombo($ware[1], $x, $y, $width, $height, BitOR($CBS_SORT, $CBS_AUTOHSCROLL, $CBS_DROPDOWNLIST, $WS_VSCROLL)) GUICtrlSetData(-1, $string, "") GUICtrlSetState(-1, $GUI_Focus) GUICtrlSetState($combo, $GUI_SHOW) Return $combo EndFunc Func _log($message, $error = False) If ($error) Then ConsoleWriteError(@HOUR & ":" & @MIN & ":" & @SEC & @TAB & $message & @CRLF) Else ConsoleWrite(@HOUR & ":" & @MIN & ":" & @SEC & @TAB & $message & @CRLF) EndIf EndFunc Func _loge($message, $error = False) If ($error) Then ConsoleWriteError(@HOUR & ":" & @MIN & ":" & @SEC & @TAB & $message & @CRLF) Else ConsoleWrite(@HOUR & ":" & @MIN & ":" & @SEC & @TAB & $message & @CRLF) EndIf EndFunc Func comboChanged() _log("Combo " & @GUI_CtrlId & " was selected") Local $clickedCombo = -1 For $i = 0 To UBound($combosLeft) If (@GUI_CtrlId == $combosLeft[$i][0]) Then $clickedCombo = $combosLeft[$i][0] $currentLabel = $combosLeft[$i][1] ExitLoop EndIf Next If ($clickedCombo == -1) Then _log("Unknown combo was clicked..", True) Return -1 EndIf Local $selectedItem = GUICtrlRead($clickedCombo) _log("Item " & $selectedItem & " was clicked.") Local $items = getItems($selectedItem) If ($items == -1) Then _log("Could not retreive items for town '" & $selectedItem & "'", True) Return -1 EndIf GUICtrlSetData($hList, "") GUICtrlSetData($hList, $items) GUICtrlSetState($hList, $GUI_SHOW) GUICtrlSetState($HLIST, $GUI_FOCUS); Focus auf ListBox $HLIST setzen EndFunc Func itemClicked() If (@GUI_CtrlId <> $hList) Then _log("Unkown callback..", True) Return -1 EndIf Local $selectedItem = GUICtrlRead($hList) _log("Item '" & $selectedItem & "' in List was clicked") GUICtrlSetState($hList, $GUI_HIDE) GUICtrlSetData($currentLabel, $selectedItem) EndFunc #endregion functions Stadt ------------------------------------------------------------------------------------------------- Func COMBOCHANGEDDUMMY() GUICtrlSetState($WLIST, $GUI_FOCUS); Fokus auf Listbox $WLIST setzen EndFunc ;==>COMBOCHANGEDDUMMY Func comboChangedd() _loge("Combo " & @GUI_CtrlId & " was selected") Local $clickedComboo = -1 For $i = 0 To UBound($comboware) If (@GUI_CtrlId == $comboware[$i][0]) Then $clickedComboo = $comboware[$i][0] $currentLabel = $comboware1[$i][1] ExitLoop EndIf Next If ($clickedComboo == -1) Then _loge("Unknown combo was clicked..", True) Return -1 EndIf Local $selectedItem = GUICtrlRead($clickedComboo) _loge("Item " & $selectedItem & " was clicked.") Local $itemss = getWareitems($selectedItem) If ($itemss == -1) Then _loge("Could not retreive items for town '" & $selectedItem & "'", True) Return -1 EndIf GUICtrlSetData($wList, "") GUICtrlSetData($wList, $itemss) GUICtrlSetState($wList, $GUI_SHOW) GUICtrlSetState($WLIST, $GUI_FOCUS); Fokus auf Listbox $WLIST setzen EndFunc Func ButtonTimer1() AdlibRegister("_start", 1000) GUICtrlSetState($Button1, $GUI_HIDE) GUICtrlSetState($Button2, $GUI_SHOW) EndFunc Func ButtonTimer2() AdlibUnRegister("_start") Global $DauerGesammt = (60 * 60 * $DauerStd) + (60 * $DauerMin) + $DauerSek GUICtrlSetData($Label1, StringFormat("%02d Std %02d Min %02d Sek", $DauerStd, $DauerMin, $DauerSek)) GUICtrlSetColor($Label1, 0xF0F8FF) ToolTip("Restzeit: " & _Sek2StdMinSek($DauerGesammt),175,0,$titel,1) GUICtrlSetState($Button1, $GUI_SHOW) GUICtrlSetState($Button2, $GUI_HIDE) EndFunc Func _start() GUICtrlSetData($Label1, "" & _Sek2StdMinSek($DauerGesammt)) If $DauerGesammt > 900 Then GUICtrlSetColor($Label1, 0xF0F8FF) ElseIf $DauerGesammt < 900 Then GUICtrlSetColor($Label1, 0xFF0000) EndIf If $DauerGesammt > 900 Then ToolTip("Restzeit: " & _Sek2StdMinSek($DauerGesammt),175,0,$titel,1) ElseIf $DauerGesammt < 900 Then ToolTip("Restzeit: " & _Sek2StdMinSek($DauerGesammt),175,0,$titel1,2) EndIf $DauerGesammt = $DauerGesammt - 1 EndFunc Func _Sek2StdMinSek($value) $format1 = "%02d:%02d:%02d" $format2 = "%02d:%02d" $format3 = "%02d Std %02d Min %02d Sek" $format4 = "%02d Std. %02d Min." $std = Floor($value / (60 * 60)) $value = $value - ((60 * 60) * $std) $min = Floor($value / (60)) $sek = $value - ((60) * $min) Return StringFormat($format3, $std, $min, $sek) EndFunc Func _toDo() AdlibUnRegister("_start") ; Timer beenden Exit ; Skript beenden EndFunc Func GuiLoeschen() GUIDelete($Form1) GUIDelete($Form2) Run(@ScriptDir & "\Handelstool.exe") _toDo() Run(@ScriptDir & "\Handelstool.exe") EndFunc
Bei Win XP/7 funktioniert es einwandfrei.
Komisch ist, das es sich vor alle win eigenen Fenster setzt, wie zb. Arbeitsplatz und der gleichen, nur beim Spiel funktioniert das nicht.
Auch habe ich es schon mit dem $WS_EX_TOPMOST Style versucht, jedoch da der gleiche Misserfolg.
Wäre super wenn jemand ne Lösung dafür hätte.
Haben dieses auch schon hier gepostet, jedoch ohne Antwort.
Auch hier habe ich es gepostet, jedoch auch da bisher keine erfolgreichen Post´s zur Behebung.
Daher hoffe ich nun das hier jemand eine bessere Antwort/Lösung hat.
Mfg Ghostleader111