Hi AlleMann,
beim Spielen mit SciTE habe ich den Koda-Code-Generator entdeckt..
Wow, ich bin begeistert und ich habe gleich das wichtigste GUI
damit entwickelt, das ich benötige: FreeScore.au3 :schild4:
Spoiler anzeigen
Code
#include <GUIConstants.au3>
#NoTrayIcon
$Form1=GUICreate("FreeScore", 258, 221, 882, 22, -1, $WS_EX_TOPMOST)
GUISetIcon("Freecell.Ico")
GUICtrlCreateLabel("Gewonnen", 9, 6, 72, 20, $SS_RIGHT)
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
GUICtrlCreateLabel("Verloren", 9, 26, 72, 20, $SS_RIGHT)
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
GUICtrlCreateLabel("Total", 9, 46, 72, 20, $SS_RIGHT)
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
$gGew=GUICtrlCreateLabel("12861", 80, 6, 44, 20, $SS_RIGHT)
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0x000080)
$gVerl=GUICtrlCreateLabel("10794", 80, 26, 44, 20, $SS_RIGHT)
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0x000080)
$gTotal=GUICtrlCreateLabel("83655", 80, 46, 44, 20, $SS_RIGHT)
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0x000080)
GUICtrlSetTip(-1, "mehr als 99999 spielt keiner..")
GUICtrlCreateLabel("=", 125, 6, 10, 20)
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
GUICtrlCreateLabel("=", 125, 26, 10, 20)
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
$gGewP=GUICtrlCreateLabel("78.28", 136, 6, 70, 20)
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0x000080)
$gVerlP=GUICtrlCreateLabel("21.72", 136, 26, 70, 20)
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0x000080)
$Edit1=GUICtrlCreateEdit("Ooops", 8, 66, 241, 117, -1, $WS_EX_CLIENTEDGE)
GUICtrlSetData($Edit1, "Dies ist KEIN Tweakprogramm.." &@CRLF &"(Spielstände werden nur gelesen!)")
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
GUICtrlSetTip(-1, "(Geschummelt wird mit Ctrl-Shift-F10)")
$Button1 = GUICtrlCreateButton("(Not allowed)", 8, 184, 33, 25, $BS_BITMAP)
GUICtrlSetImage($Button1, "C:\AutoIt3\au3\FreeScore-F5.Bmp")
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetTip(-1, "Aktualisieren..")
$Button2=GUICtrlCreateButton("(Not allowed)", 44, 184, 40, 25, $BS_BITMAP)
GUICtrlSetImage($Button2, "C:\AutoIt3\au3\FreeScore-Exit.bmp")
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetTip(-1, "Na, was wohl..")
$Button3=GUICtrlCreateButton("(Not allowed)", 175, 184, 75, 25, $BS_BITMAP)
GUICtrlSetImage($Button3, "C:\AutoIt3\au3\FreeScore-Nochmal.bmp")
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetTip(-1, "..doch nochmal ;-))")
GUISetState(@SW_SHOW)
ShowIt()
While 1
Switch GuiGetMsg()
Case $Button1
ShowIt()
Case $Button2
Exit
Case $Button3
If WinActivate("FreeCell")=0 Then Run("FreeCell.Exe")
Case $GUI_EVENT_CLOSE
ExitLoop
Case Else
;;;;;;;;;;;;;;
EndSwitch
WEnd
Exit
Func ShowIt()
Dim $vk=6
$Gew=Bin2Int("won")
$Verl=Bin2Int("lost")
$Total=$Gew+$Verl
$GewP=StringFormat("%" &$vk &".2f", Round($Gew/$Total*100, 2))
$VerlP=StringFormat("%" &$vk &".2f", Round($Verl/$Total*100, 2))
GUICtrlSetData($gGew, $Gew)
GUICtrlSetData($gVerl, $Verl)
GUICtrlSetData($gTotal, $Total)
GUICtrlSetData($gGewP, $GewP &"%")
GUICtrlSetData($gVerlP, $VerlP &"%")
EndFunc
Func Bin2Int($Was)
Dim $s=RegRead("HKCU\Software\Microsoft\Windows\CurrentVersion\Applets\FreeCell", $Was)
Return GetIt($s, 1)*(16^0)+GetIt($s, 3)*(16^2)+GetIt($s, 5)*(16^3)+GetIt($s, 7)*(16^6)
EndFunc
Func GetIt($s, $Was)
Return "0x" &StringMid($s, $Was, 2)
EndFunc
Alles anzeigen
Allerdings habe ich eine Frage dazu:
Ist es möglich die dämlichen Scrollbar-Reste aus der EditBox
rauszuwerfen? Nur mit der englischen/Hilfe habe ich es nicht geschafft..
Wäre schön, wenn mir jemand helfen könnte..
Gruß und Dank im Voraus
ytwinky