oben habe ich doch den code gepostet
und ja #RequireAdmin ist drinne..
ka wieso compilen wenn es net funtzt aber habe ich auch ma probiert und jap 32bit leider auch fehl...
Beiträge von SSlayer93
-
-
hmm komisch, obwohl soviele die UDF nutzen..
Trotzdem währe sehr dankbar dafür -
Leider die 0 ....
-
hmm hab ich mir gedacht, versuche es grade so zu machen leider habe ich das gefühl irgendwas stimmt trotzdem da nicht....
Spoiler anzeigen
[autoit]#RequireAdmin
[/autoit] [autoit][/autoit] [autoit]
#include <_NomadMemory.au3>HotKeySet("{ESC}", _Exit)
[/autoit] [autoit][/autoit] [autoit]
SetPrivilege("SeDebugPrivilege", 1)Global $StaticOffset = 0x00078C94
[/autoit] [autoit][/autoit] [autoit]
$sModule = "pcsx2-r5875.exe"
$hPid = _MemoryOpen(ProcessExists("pcsx2-r5875.exe"))$BasePointer = _MemoryModuleGetBaseAddress($hPid,$sModule)
[/autoit] [autoit][/autoit] [autoit]$hRead = _MemoryRead($BasePointer + $StaticOffset,$hPid , "dword") + 0xA8
[/autoit] [autoit][/autoit] [autoit]While 1
[/autoit] [autoit][/autoit] [autoit]
Sleep(100)
$value = _MemoryRead($hRead, $hPid, "dword")
ToolTip("State: " & $value, 0, 0)WEnd
[/autoit] [autoit][/autoit] [autoit]Func _Exit()
[/autoit]
Exit
EndFunc ;==>_Exit -
Mal ne nebenfrage
_MemoryModuleGetBaseAddress($iPID, $sModule)$PID ist mir klar
jedoch wofür steht $sModule?
hab woanders mal nachgeschaut und da wird die .dll datei aufgerufen... Währe super wenn jemand es mal kurz fassen könnte wofür $sModule steht, leider gibt es keine beschreibung für im NomadMemory.
-
ach da versteckt er sich hab eher auf die Kommentare geachtet...
anyway, danke werde mal schauen. -
sry aber _MemoryModuleGetBaseAddress findet man als .au3 nicht...
da werden auch Russischen seiten mit angezeigt..ist MemoryModuleGetBaseAddress und MemoryGetBaseAddress 2 verschiedene Funktionen?
-
komisch, in dem _NomadPointer.au3 gibts kein _MemoryModuleGetBaseAddress funktion...
hab mal grad im google geschaut leider nichts gefunden...Gibts von Nomad mehrere versionen?
kann es dies hier sein? _MemoryGetBaseAddress
-
Tach zusammen,
ich habe folgendes problem.... ich würde gerne von einem Programm den jeweiligen Speicherstand 0-9 auslesen je nach halt welche ausgewählt wurde, durch das drücken von F2 ändert sich die Zahl höher.
Ich habe es eigentlich geschafft es auszulesen jedoch bei einem neustart des Programms ändert sich die Adresse deswegen suche ich nach dem Pointer was ich auch mehr oder weniger geschafft habe,
das Problem besteht jedoch...hier mal ein kleines beispiel, da ich das einfach nicht in worten beschreiben kann
z.b: 0x0059F678 ist die Gefundene Adresse von dem jeweiligem gesuchten Wert (0-9)
durch "Pointer scan for this address" im CheatEngine habe ich einige Werte gefunden mit dem Max Lvl 1, habe auch die anderen lvl ausprobiert aber am ende sind diese Gleich und nur ein Offset.
Z.bOffset : A8
"pcsx2-r5875.exe"+00078C94Nun wenn ich "pcsx2-r5875.exe" als Adresse eintrage kriege ich den wert = 000C0000
diese ändert sich jedoch nach einem neustart....
gibt es einen weg "pcsx2-r5875.exe" zuerst in die Jeweilige Hex zu umwandeln und dann diese zu benutzen, oder sogar es direkt so zu nutzen wie es ist ???Hiermal der Code... diesen weg habe ich im Youtube gefunden habe auch viele andere versucht, leider trotzdem alles daneben nach einem Neustart...
Was mache ich da Falsch?, suche ich falsch? oder schreibe ich es Falsch?
Danke im Vorraus...Spoiler anzeigen
[autoit]
[/autoit] [autoit][/autoit] [autoit]
#RequireAdmin
#include <_NomadPointer.au3>HotKeySet("{ESC}", _Exit)
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]Global $BasePointer = 0x000C0000 , $StaticOffset = 0x00078C94
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
$hOpen = _MemoryOpen (ProcessExists ("pcsx2-r5875.exe"))
$hRead = _MemoryRead ($BasePointer + $StaticOffset,$hOpen,"Dword") + 0xA8While 1
[/autoit] [autoit][/autoit] [autoit]
Sleep (100)
$value = _MemoryRead ($hRead,$hOpen,"dword")
ToolTip ("State: "& $value,0,0)WEnd
[/autoit] [autoit][/autoit] [autoit]Func _Exit()
[/autoit] [autoit][/autoit] [autoit][/autoit]
Exit
EndFunc ;==>_ExitP.s. diese ist keineswegs für ein BOT, nur zum auslesen des Speicher Stand....
-
Der Thread hier ist fast schon etwas verarsche.
Du hantierst immer wieder mit anderen Variablen rum und das ist nur ein rumgestochere ohne Ansatz von Eigeninitiative. Für das Script das du da zusammengebastelt hast fehlt dir einfach viel zu viel Hintergrundwissen...
Schnitzel; Ich verstehe leider nicht warum dieser Thread hier eine so genannte "fast" verarsche sein soll...
ohne Eigeninitiative sagst du, find ich echt schade das du sowas sagst... da es einfach nicht stimmt...
das mir der Hintergrundwissen dazu fehlt muss mir keiner Weiß machen, habe erst vor kurzem mit programmieren angefangen kein 1 monat her, wenn ihr von einem Neuling erwartet das er ohne fragen sondern durch sogenanntes Eigeninitiative weiter kommen soll, warum dann der Thread "Hilfe & Unterstützung" ???Wie auch immer danke für die Tollen meinungen und Kritiken, ein paar sachen habe ich gelernt, man lernt nie aus
Ich sage dazu nur: Zeile 237 und Zeile 238.
Dass ist genau das, was ich schon vermutet hatte.
Du solltest wirklich erstmal die Grundlagen in AutoIt erlernen.Oscar ; so dumm kann keiner sein der Programmieren versucht und nicht feststellt das der Fehler auf der Zeile 237 und 238 ist...
wie gesagt Grundlagen lernt man nicht von heute auf morgen, da ich der eher der Praktische typ bin lerne ich viel schneller wenn ich alles selber versuche auch wenn es zeit kostet, was es mir Wert ist...Und zum guten Nachricht, ALLES klappt , lag am: ISN AutoIt Studio selber , als ich das ganze im SciTe versucht habe ging das ganze mit der Variable GUICtrlSetData($PBMarquee[2], $ReadLine), keine ahnung was das soll aber eins steht fest..., bleibe nun für immer auf SciTe!!!
-
Du hast in deinem Script $PBMarquee eben nicht als Array deklariert, sondern nur als eine gewöhnliche Variable ...
doch hatte ich jedoch dann wieder gelöscht, als ich was anderes probieren wollte
-
ne leider der gleiche Error
[autoit]
Der will gar kein [] haben -.-==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.:
[/autoit]
GUICtrlSetData($PBMarquee[3], $ReadLine) -
oke,entschuldigt den aufwand hier dann der Script... dachte würde reichen solange man das in der Funktion den fehler behebt deswegen gekürzt
Spoiler anzeigen
[autoit]Global $ReadLine, $LogFile, $INI, $INI2, $exeFile, $Button1, $Button2, $Button3, $Button4, $Button5, $Button6, $Button7, $Button8
[/autoit] [autoit][/autoit] [autoit]
Global $emuLog, $f2, $Label2, $hDLL, $hEdit, $string, $pos
Global $Xpos, $Ypos, $time, $pressedOnButton, $pressedOffButton
Global $Form1, $Form2, $Form3
Global $hEdit1, $hEdit2, $hEdit3, $ReadOff, $ReadOn, $Readme, $CustomSplash,$PBMarquee, $SplashInLabel#NoTrayIcon
[/autoit] [autoit][/autoit] [autoit]
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <GuiEdit.au3>
#include <Misc.au3>
#include <Restart.au3>
#include <ScrollBarsConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <ButtonConstants.au3>
#include <Timers.au3>
#include <TastenAbfragen.au3>
#include <_ProgressGUI_NoProgressbar.au3>;============================================================================================================
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
; CHECK config.ini And Readme.txt
;============================================================================================================
;=> IF FILE NOT EXIST THEN SHOW SPLASH TEXT
If FileExists (@ScriptDir &"\Readme.txt")Then
$Readme = FileRead (@ScriptDir &"\Readme.txt")
EndIf
If Not FileExists(@ScriptDir & "\config.ini") Then
SplashTextOn("1", "Please Chose Path First!!!", 500, 100, -1, -1, 1 + 32, "Algerian", 22)
Sleep(1500)
SplashOff()
EndIf
;~ **********************************************************ua************************************************;============================================================================================================
[/autoit] [autoit][/autoit] [autoit]
; MAIN INTERFACE [FORM:1]
;============================================================================================================
While 1
$INI = IniRead("config.ini", "Config", "Path", "")
Sleep(10)
$INI2 = IniRead("config.ini", "PCSX2", "exe", $exeFile);~ !!!! ~~~ !!!! ~~~
[/autoit] [autoit][/autoit] [autoit]
$hDLL = DllOpen("user32.dll")
$emuLog = FileOpen($INI & "\logs\emuLog.txt", 0)
$LogFile = FileRead($emuLog)
$ReadLine = FileReadLine($emuLog, -1)
$ReadOff = IniRead(@ScriptDir & "\config.ini", "ON", "Preview", "")
$ReadOn = IniRead(@ScriptDir & "\config.ini", "OFF", "Preview", "");~ !!!! ~~~ !!!! ~~~
[/autoit] [autoit][/autoit] [autoit];=> ~~~ CREATE GUI ~~~
[/autoit] [autoit][/autoit] [autoit]
#Region
$Form1 = GUICreate("PCSX2 SaveState Preview", 500, 500, -1, -1)
GUISetBkColor(0x3378A5)
$Menu1 = GUICtrlCreateMenu("Menu")
$MenuItem = GUICtrlCreateMenuItem("About", $Menu1)
$Restart = GUICtrlCreateMenuItem("Restart ", $Menu1, 5, 1)
$MenuItem2 = GUICtrlCreateMenuItem("Reset Path", $Menu1)
$MenuItem3 = GUICtrlCreateMenuItem("Download PCSX2", $Menu1)$CoordButton = GUICtrlCreateButton("Set Position", 0, 145, 100, 41)
[/autoit] [autoit][/autoit] [autoit]
GUICtrlSetFont(-1, 12, 400, 2, "Bodoni MT", 5)$Button2 = GUICtrlCreateButton("Run PCSX2", 200, 125, 100, 41)
[/autoit] [autoit][/autoit] [autoit]
GUICtrlSetFont(-1, 12, 400, 2, "Bodoni MT", 5)$Button3 = GUICtrlCreateButton("Chose Path", 400, 100, 100, 41)
[/autoit] [autoit][/autoit] [autoit]
GUICtrlSetFont(-1, 12, 400, 2, "Bodoni MT", 5)$Button4 = GUICtrlCreateButton("Set Time", 400, 145, 100, 41)
[/autoit] [autoit][/autoit] [autoit]
GUICtrlSetFont(-1, 12, 400, 2, "Bodoni MT", 5)$Button5 = GUICtrlCreateButton("Key Set", 0, 100, 100, 41)
[/autoit] [autoit][/autoit] [autoit]
GUICtrlSetFont(-1, 12, 400, 2, "Bodoni MT", 5)$Label1 = GUICtrlCreateLabel(":CURRENT STATE:", 0, 0, 500, 40)
[/autoit] [autoit][/autoit] [autoit]
GUICtrlSetStyle(-1, $SS_CENTER + $SS_SUNKEN + $BS_MULTILINE)
GUICtrlSetFont(-1, 23, 800, 4, "Algerian")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x3378A5)$Label2 = GUICtrlCreateLabel($ReadLine, 0, 40, 500, 35)
[/autoit] [autoit][/autoit] [autoit]
GUICtrlSetBkColor(-1, 0x3378A5)
GUICtrlSetStyle(-1, $SS_CENTER + $SS_SUNKEN)
GUICtrlSetCursor(-1, "4")
GUICtrlSetFont(-1, 20, 800, "", "Bodoni MT")
GUICtrlSetColor(-1, 0x0EFE01)
GUICtrlSetData($Label2, $ReadLine)$hEdit = GUICtrlCreateEdit($string, 0, 185, 500, 300, BitOR($ES_WANTRETURN, $WS_VSCROLL, $ES_READONLY))
[/autoit] [autoit][/autoit] [autoit]
GUICtrlSetCursor(-1, "3")
GUICtrlSetFont(-1, 10, 400, 0, "Tahoma")
$string = _GUICtrlEdit_SetText($hEdit, $LogFile)
$GetTextLen = _GUICtrlEdit_GetTextLen($hEdit)
_GUICtrlEdit_SetSel($hEdit, $GetTextLen, $GetTextLen)
_GUICtrlEdit_Scroll($hEdit, $SB_SCROLLCARET)
GUISetState()
#EndRegion
;=> ~~~ END GUI ~~~;=> *** USER DEFINED FUNCTIONS (UDF´s) ***
[/autoit] [autoit][/autoit] [autoit]
While 1Switch GUIGetMsg()
[/autoit] [autoit][/autoit] [autoit]Case $GUI_EVENT_CLOSE
[/autoit] [autoit][/autoit] [autoit]
_CLOSE()
Case $Button2
_StartPCSX2()
Case $Button3
_SetPath()
Case $Restart
_Restarting()
Case $MenuItem
GUISetState(@SW_DISABLE, $Form1)
_About()
Case $MenuItem2
_ResetPath()
Case $MenuItem3
_URLPCSX2()
Case $CoordButton
_SetCoordButton()
Case $Button4
_TimeSet()
Case $Button5
_KeySet()EndSwitch
[/autoit] [autoit][/autoit] [autoit]Switch Key()
[/autoit] [autoit][/autoit] [autoit]
Case "F2"
_F2Key()
Case $ReadOff
_DisablePreview()
Case $ReadOn
_EnablePreview()EndSwitch
[/autoit] [autoit][/autoit] [autoit]
WEnd
WEnd
;~ **********************************************************************************************************
;~ **********************************************************************************************************
;~ **********************************************************************************************************;============================================================================================================
[/autoit] [autoit][/autoit] [autoit]
; CLOSE EVENTS
;============================================================================================================
Func _CLOSE()
Exit
EndFunc ;==>_CLOSE
;~ **********************************************************************************************************;============================================================================================================
[/autoit] [autoit][/autoit] [autoit]
; DISABLE PREVIEW [BUTTON] [$hEdit2]
;============================================================================================================
Func _DisableP()
While Not($pressedOffButton = "pause")
$pressedOffButton = Key(Default, "1000", "1000")
GUISetState()
GUICtrlSetState($Button7, $GUI_DISABLE)
$mPos = MouseGetPos()
ToolTip("Detecting...." & $mPos)
Sleep(0)
If $pressedOffButton ThenIniWrite(@ScriptDir & "\config.ini", "Preview", "OFF", $pressedOffButton)
[/autoit] [autoit][/autoit] [autoit]
$sPB = _GUICtrlEdit_SetText($hEdit2, "OFF: " & $pressedOffButton)
GUICtrlSetStyle($hEdit2, $SS_CENTER + $SS_SUNKEN + $BS_MULTILINE)
$mPos = MouseGetPos()
ToolTip("Detected!" & $mPos)
Sleep(300)
ToolTip("")
ExitLoop
EndIf
WEnd
EndFunc ;==>_DisableP;~ **********************************************************************************************************
[/autoit] [autoit][/autoit] [autoit];============================================================================================================
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
; DISABLE PREVIEW
;============================================================================================================
Func _DisablePreview()
$Xpos = IniRead(@ScriptDir & "\config.ini", "Coordinates_X", "X", "")
$Ypos = IniRead(@ScriptDir & "\config.ini", "Coordinates_Y", "Y", "")
$ReadOn = IniRead(@ScriptDir & "\config.ini", "Preview", "ON", "")
$ReadOff = IniRead(@ScriptDir & "\config.ini", "Preview", "OFF", "")
WinSetOnTop("SplashWindow", "", 0)EndFunc ;==>_DisablePreview
[/autoit] [autoit][/autoit] [autoit]
;~ **********************************************************************************************************;============================================================================================================
[/autoit] [autoit][/autoit] [autoit]
; ENABLE PREVIEW [$hEdit1]
;============================================================================================================
Func _EnableP()While Not($pressedOnButton = "pause")
[/autoit] [autoit][/autoit] [autoit]$pressedOnButton = Key(Default, "500", "500")
[/autoit] [autoit][/autoit] [autoit]
GUISetState()
GUICtrlSetState($Button8, $GUI_DISABLE)
$mPos = MouseGetPos()
ToolTip("Detecting...." & $mPos)
Sleep(0)
If $pressedOnButton Then
IniWrite(@ScriptDir & "\config.ini", "Preview", "ON", $pressedOnButton)
$sPB = _GUICtrlEdit_SetText($hEdit1, "ON: " & $pressedOnButton)
GUICtrlSetStyle($hEdit1, $SS_CENTER + $SS_SUNKEN + $BS_MULTILINE)$mPos = MouseGetPos()
[/autoit] [autoit][/autoit] [autoit]
ToolTip("Detected!" & $mPos)
Sleep(300)
ToolTip("")
ExitLoopEndIf
[/autoit] [autoit][/autoit] [autoit]
WEndEndFunc ;==>_EnableP
[/autoit] [autoit][/autoit] [autoit]
;~ **********************************************************************************************************;============================================================================================================
[/autoit] [autoit][/autoit] [autoit]
; ENABLE PREVIEW
;============================================================================================================
Func _EnablePreview()
$Xpos = IniRead(@ScriptDir & "\config.ini", "Coordinates_X", "X", "")
$Ypos = IniRead(@ScriptDir & "\config.ini", "Coordinates_Y", "Y", "")
$ReadOn = IniRead(@ScriptDir & "\config.ini", "Preview", "ON", "")
$ReadOff = IniRead(@ScriptDir & "\config.ini", "Preview", "OFF", "");~ _ProgressGUI($readline,"",Fontsize, $s_Font, $i_XSize, $i_YSize, $b_GUIColor, $b_FontColor)
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
$CustomSplash = _ProgressGUI($ReadLine, 1, 20, "", 330, 50, 1, 0xE35522)
GUICtrlSetStyle($PBMarquee[0], -1, 0x00100000) ;<<<<<<<<<<<<<<< This makes the first GUI movable with the mouse
GUISetCoord ( $Xpos, $Ypos, $CustomSplash )
WinSetOnTop("SplashWindow", "", 1)EndFunc ;==>_EnablePreview
[/autoit] [autoit][/autoit] [autoit];============================================================================================================
[/autoit] [autoit][/autoit] [autoit]
; F2 KEY
;============================================================================================================
Func _F2Key()
$emuLog = FileOpen($INI & "\logs\emuLog.txt", 0)
$LogFile = FileRead($emuLog)
$string = _GUICtrlEdit_SetText($hEdit, $LogFile)
$GetTextLen = _GUICtrlEdit_GetTextLen($hEdit)
_GUICtrlEdit_SetSel($hEdit, $GetTextLen, $GetTextLen)
_GUICtrlEdit_Scroll($hEdit, $SB_SCROLLCARET)
$emuLog = FileOpen($INI & "\logs\emuLog.txt", 0)
$ReadLine = FileReadLine($emuLog, -1)
GUICtrlSetData($Label2, $ReadLine)$Xpos = IniRead(@ScriptDir & "\config.ini", "Coordinates_X", "X", "")
[/autoit] [autoit][/autoit] [autoit]
$Ypos = IniRead(@ScriptDir & "\config.ini", "Coordinates_Y", "Y", "")
$time = IniRead(@ScriptDir & "\config.ini", "Time", "milliseconds", "")If WinExists ("SplashWindow","") Then
[/autoit] [autoit][/autoit] [autoit]
GUICtrlSetData($SplashInLabel , $ReadLine)ElseIf not WinExists ("SplashWindow","") Then
[/autoit] [autoit][/autoit] [autoit]
;~ _ProgressGUI($readline,"",Fontsize, $s_Font, $i_XSize, $i_YSize, $b_GUIColor, $b_FontColor)
$CustomSplash = _ProgressGUI($ReadLine, 1, 20, "", 330, 50, 1, 0xE35522)
GUICtrlSetStyle($CustomSplash[2], -1, 0x00100000) ;<<<<<<<<<<<<<<< This makes the first GUI movable with the mouse
WinSetOnTop("SplashWindow", "", 1)
EndIf
Sleep($time)
SplashOff()If $time = 0 Then
[/autoit] [autoit][/autoit] [autoit]
$time = IniRead(@ScriptDir & "\config.ini", "Time", "milliseconds", "")
SplashTextOn("", $ReadLine, 250, 45, $Xpos, $Ypos, 1, "", 12, 800)
EndIf
EndFunc ;==>_F2Key
;~ **********************************************************************************************************;============================================================================================================
[/autoit] [autoit][/autoit] [autoit]
; About
;============================================================================================================
;=> HELP SUB MENU (MENUITEM) CREATE GUI AND LABEL FOR INFO
Func _About()
$Form2 = GUICreate("About", 400, 200, -1, -1)
GUISetBkColor(0x3378A5)
$Label3 = GUICtrlCreateLabel(":ABOUT:", -0, -0, 400, 32, $SS_CENTER)
GUICtrlSetFont(-1, 22, 800, 4, "Algerian")
GUICtrlSetColor(-1, 0xFFFFFF)
$Label4 = GUICtrlCreateLabel("~PCSX2 SaveState Preview~", 0, 80, 400, 40, $SS_CENTER)
GUICtrlSetFont(-1, 15, 800, 4, "Algerian")
GUICtrlSetColor(-1, 0x03E92C)
$Label5 = GUICtrlCreateLabel("Version: 1.2", 0, 40, 400, 40, $SS_CENTER)
GUICtrlSetFont(-1, 15, 800, 4, "Algerian")
GUICtrlSetColor(-1, 0x03E92C)$Button4 = GUICtrlCreateButton(",~CLOSE~ ,", 92, 160, 201, 41)
[/autoit] [autoit][/autoit] [autoit]
GUICtrlSetFont(-1, 12, 800, 4, "Algerian")
GUICtrlSetColor(-1, 0x000000)
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUISetState(@SW_SHOW)While 3
[/autoit] [autoit][/autoit] [autoit]
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE, $Button4
GUIDelete($Form2)
GUISetState(@SW_ENABLE, $Form1)
GUISetState (@SW_RESTORE,$Form1)
ExitLoop
EndSwitch
WEnd
EndFunc ;==>_Help
;~ **********************************************************************************************************;============================================================================================================
[/autoit] [autoit][/autoit] [autoit]
; KEY SET BUTTON ==> FORM 3
;============================================================================================================
Func _KeySet()
If WinExists("config.ini - Editor") Then WinClose("[CLASS:Notepad]")#Region ### START Koda GUI section ### Form=
[/autoit] [autoit][/autoit] [autoit]
$Form3 = GUICreate("Set Your Key", 350, 300, -1, -1)
GUICtrlSetState($Form3, @SW_SHOWNOACTIVATE)
$Button7 = GUICtrlCreateButton("Disable Preview", 210, 260, 140, 40)
GUICtrlSetFont(-1, 8.5, 800, 0)
GUICtrlSetBkColor(-1, 0xE40C0C)
$Button8 = GUICtrlCreateButton("Enable Preview", 0, 260, 140, 40)
GUICtrlSetFont(-1, 8.5, 800, 0)
GUICtrlSetBkColor(-1, 0x3CD556)
$Button9 = GUICtrlCreateButton("Restore", 145, 270, 60, 30)$hEdit1 = GUICtrlCreateEdit("", 0, 0, 350, 50, BitOR($SS_CENTER, $ES_WANTRETURN, $WS_VSCROLL, $ES_READONLY))
[/autoit] [autoit][/autoit] [autoit]
GUICtrlSetFont(-1, 10, 400, 0, "Tahoma", 5)
GUICtrlSetCursor(-1, "3")
GUICtrlSetStyle(-1, BitOR($ES_WANTRETURN, $WS_VSCROLL, $ES_READONLY))
GUICtrlSetFont(-1, 23, 800, 4, "Algerian")
GUICtrlSetColor(-1, 0x00FF00)
GUICtrlSetBkColor(-1, 0x3378A5)
$ReadOn = IniRead(@ScriptDir & "\config.ini", "Preview", "ON", "")
_GUICtrlEdit_SetText($hEdit1, "ON: " & $ReadOn)
GUICtrlSetStyle($hEdit1, $SS_CENTER + $SS_SUNKEN + $BS_MULTILINE)
[/autoit] [autoit][/autoit] [autoit]
;~ _GUICtrlEdit_Create($hWnd, $sText, $iX, $iY [, $iWidth = 150 [, $iHeight = 150 [, $iStyle, $iExStyle ])
$hEdit2 = GUICtrlCreateEdit("", 0, 50, 350, 50)
GUICtrlSetFont(-1, 10, 400, 0, "Tahoma", 5)
GUICtrlSetCursor(-1, "3")
GUICtrlSetStyle(-1, BitOR($ES_WANTRETURN, $WS_VSCROLL, $ES_READONLY))
GUICtrlSetFont(-1, 23, 800, 4, "Algerian")
GUICtrlSetColor(-1, 0xFF0000)
GUICtrlSetBkColor(-1, 0x3378A5)
$ReadOff = IniRead(@ScriptDir & "\config.ini", "Preview", "OFF", "")
_GUICtrlEdit_SetText($hEdit2, "OFF: " & $ReadOff)
GUICtrlSetStyle($hEdit2, $SS_CENTER + $SS_SUNKEN + $BS_MULTILINE)
[/autoit] [autoit][/autoit] [autoit]
;~ GUICtrlCreateEdit ( "text", left, top [, width [, height [, style [, exStyle]]]] )
$hEdit4 = GUICtrlCreateEdit("", 0, 100, 350, 160, BitOR($ES_WANTRETURN, $WS_VSCROLL, $ES_READONLY))
_GUICtrlEdit_SetText($hEdit4, $Readme)
$GetTextLen = _GUICtrlEdit_GetTextLen($hEdit4)
_GUICtrlEdit_SetSel($hEdit4, $GetTextLen, $GetTextLen)
_GUICtrlEdit_Scroll($hEdit4, $SB_SCROLLCARET)GUISetState(@SW_SHOW)
[/autoit] [autoit][/autoit] [autoit]
#EndRegion ### END Koda GUI section ###
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
_ScriptRestart()
Case $Button7 ;==> Disable Preview
_DisableP()
Case $Button8 ;==> Enable Preview
_EnableP()
Case $Button9
GUISetState()
GUICtrlSetState($Button7, $GUI_ENABLE)
GUICtrlSetState($Button8, $GUI_ENABLE)EndSwitch
[/autoit] [autoit][/autoit] [autoit]WEnd
[/autoit] [autoit][/autoit] [autoit]
EndFunc ;==>_KeySet
;~ **********************************************************************************************************;============================================================================================================
[/autoit] [autoit][/autoit] [autoit]
; RESET PATH
;============================================================================================================
Func _ResetPath()
If FileExists(@ScriptDir & "\config.ini") Then
FileDelete(@ScriptDir & "\config.ini")
If Not FileExists(@ScriptDir & "\config.ini") Then
Sleep(100)
_SetPath()
EndIf
EndIf
EndFunc ;==>_ResetPath
;~ **********************************************************************************************************;============================================================================================================
[/autoit] [autoit][/autoit] [autoit]
; RESTART COMPLETE SCRIPT with _ScriptRestart () [UDF]
;============================================================================================================
;=> RESTART COMPLETE SCRIPT
Func _Restarting()
If SplashTextOn("", "RESTARTING....", 200, 50, -1, -1, 1) Then
Sleep(10)
_ScriptRestart()
EndIf
EndFunc ;==>_Restarting
;~ **********************************************************************************************************;============================================================================================================
[/autoit] [autoit][/autoit] [autoit]
; SET COORDINATES
;============================================================================================================
Func _SetCoordButton()
SplashTextOn("1", "Press Enter To set Coordinates", 500, 80, -1, -10, 1 + 32, "Algerian", 22)
GUISetState(@SW_DISABLE, $Form1)
While 1If _IsPressed("0D", $hDLL) Then
[/autoit] [autoit][/autoit] [autoit]
IniWrite(@ScriptDir & "\config.ini", "Coordinates_X", "X", $pos[0])
$Xpos = IniRead(@ScriptDir & "\config.ini", "Coordinates_X", "X", $pos[0])IniWrite(@ScriptDir & "\config.ini", "Coordinates_Y", "Y", $pos[1])
[/autoit] [autoit][/autoit] [autoit]
$Ypos = IniRead(@ScriptDir & "\config.ini", "Coordinates_Y", "Y", $pos[1])ToolTip("")
[/autoit] [autoit][/autoit] [autoit]
SplashTextOn("", $ReadLine, 250, 45, $Xpos, $Ypos, 1, "", 12, 800)GUISetState(@SW_ENABLE, $Form1)
[/autoit] [autoit][/autoit] [autoit]
ExitLoop
Else
$pos = MouseGetPos()
ToolTip($pos[0] & "x" & $pos[1])
Sleep(0)
EndIfWEnd
[/autoit] [autoit][/autoit] [autoit]EndFunc ;==>_SetCoordButton
[/autoit] [autoit][/autoit] [autoit]
;~ **********************************************************************************************************;============================================================================================================
[/autoit] [autoit][/autoit] [autoit]
; SET PATH
;============================================================================================================
;~ ------------------WRITE FOLDER PATH TO INI AND READ FOLDER PATH FROM INI-----------------
Func _SetPath()$FileExist = FileExists(@ScriptDir & "\config.ini")
[/autoit] [autoit][/autoit] [autoit]
If $FileExist Then
SplashTextOn("", "Path already exists!", 300, 50, -1, -10, 16, "Algerian", 15)
Sleep(500)
SplashTextOn("", "", "", "", "", 30000, 1, "", "", "")
Else$INI = IniRead("config.ini", "Config", "Path", "")
[/autoit] [autoit][/autoit] [autoit]
If($INI = "") Then
SplashTextOn("1", "Chose Main Folder from PCSX2", 500, 70, -1, -10, 1 + 32, "Algerian", 22)
$INI = FileSelectFolder("", "")
IniWrite(@ScriptDir & "\config.ini", "Config", "Path", $INI);~ ------------------WRITE PATH TO INI AND READ FOLDER PATH FROM INI-----------------
[/autoit] [autoit][/autoit] [autoit];~ .............................................................................................
[/autoit] [autoit][/autoit] [autoit];~ ------------------WRITE EXE PATH TO INI AND READ EXE PATH FROM INI-----------------
[/autoit] [autoit][/autoit] [autoit]
$INI2 = IniRead("config.ini", "PCSX2", "exe", $exeFile)
If($INI2 = "") Then
SplashTextOn("1", "Chose PCSX2.exe", 500, 70, -1, -10, 1 + 32, "Algerian", 22)
$INI2 = FileOpenDialog("", "", "PCSX2.exe(*.exe*)")
IniWrite(@ScriptDir & "\config.ini", "PCSX2", "exe", $INI2)
$INI2 = IniRead("config.ini", "PCSX2", "exe", $exeFile)
$INI = IniRead("config.ini", "Config", "Path", "")
;~ ------------------WRITE EXE PATH TO INI AND READ EXE PATH FROM INI-----------------;=> AFTER PATH IS CHOSEN SCRIPT RESTARTS AND SPLASH WILL BE SHOWN
[/autoit] [autoit][/autoit] [autoit]
If SplashTextOn("", "RESTARTING....", 200, 50, -1, -1, 1) Then
Sleep(1000)
_ScriptRestart()EndIf
[/autoit] [autoit][/autoit] [autoit]
EndIf
EndIf
EndIf
EndFunc ;==>_SetPath
;~ **********************************************************************************************************;============================================================================================================
[/autoit] [autoit][/autoit] [autoit]
; START PCSX2
;============================================================================================================
Func _StartPCSX2()
Sleep(200)
Run($INI2)
EndFunc ;==>_StartPCSX2
;~ **********************************************************************************************************;============================================================================================================
[/autoit] [autoit][/autoit] [autoit]
; TIME SET
;============================================================================================================
Func _TimeSet()$time = InputBox("Enter Time ", "Infinity: = 0, 1 Second = 1000", "0", "")
[/autoit] [autoit][/autoit] [autoit]
IniWrite(@ScriptDir & "\config.ini", "Time", "milliseconds", $time)
$time = IniRead(@ScriptDir & "\config.ini", "Time", "milliseconds", "")
;==>_TimeSetEndFunc ;==>_TimeSet
[/autoit]
Func _URLPCSX2()
ShellExecute("http://pcsx2.net/download.html")
EndFunc ;==>_URLPCSX2 -
SSlayer93, wenn du nicht in der Lage bist, komplette Scripte zu posten, lass die Programmiererei sein! Wenn deine Scripte so geheim sind, dass man sie niemandem zeigen darf, dann frag dich mal, was du hier willst!
Jede Wette, ein komplettes Script wird gepostet und in den nächsten 2 Posts stehen 3 Lösungsansätze.....aber so?Willste beleidigen oder Helfen?, geheimerei? hat rein gar nichts damit zu tun der Rest der Script sind nur andere Funktionenen die Rein gar nichts mit dem problem zu tun haben
und 150% unabhängig von dem ganzen hier, deswegen habe ich mir die arbeit gespart damit ich und die Jenigen die helfen mögen das problem nicht aus den augen verlieren.Hab leider bis jetzt nie Array gebraucht bzw damit gearbeitet deswegen bisschen langsam heute
Wie rufst Du die Funktion aus der UDF auf?
$PBMarquee ist eine lokale Variable. Die kannst Du nicht vom Hauptprogramm aus benutzen.
Du musst das Array verwenden, dass Du von der Funktion zurück bekommst.Steht eigentlich alles oben
[autoit]
Wie genau würde das gehen?, ich verstehe schon was du meinst weis leider net genau wie ich das umsetzen kann...
hab mir paar beispiele im Hilfe angesehen und diese hier versucht :Global $SplashInLabel = UBound ($PBMarquee,2)
[/autoit]und dann in meinem Script :
[autoit]If WinExists ("SplashWindow","") Then
[/autoit]
GUICtrlSetData($SplashInLabel , $ReadLine)Spoiler anzeigen
[autoit]; #FUNCTION# ====================================================================================================================
[/autoit]
; Name...........: _ProgressGui
; Description ...: A small splash screen type GUI with a progress bar and a configurable label
; Syntax.........: _ProgressGUI($s_MsgText = "Text Message", $s_MarqueeType = 0, $i_Fontsize = 14, $s_Font = "Arial", $i_XSize = 290, $i_YSize = 100, $b_GUIColor = -1, $b_FontColor = -1)
; Parameters ....: $s_MsgText - Text to display on the GUI
; $s_MarqueeType - [optional] Style of Progress Bar you want to use
; 0 = Marquee style [default]
; 1 = Normal Progress Bar style
; $i_Fontsize - [optional] The font size that you want to display the $s_MsgText at [default = 14]
; $s_Font - [optional] The font you want the message to use [default = "Arial"]
; $i_XSize - [optional] Width of the GUI [Default = 290] - Minimum size is 80
; $i_YSize - [optional] Height of the GUI [Default = 100] - Minimum size is 100
; $b_GUIColor - [optional] Background color of the GUI [default = 0x00080FF = Blue]
; $s_FontColor - [optional] Color of the text message [default = 0x0FFFC19 = Yellow]
; Return values .: Success - An array containing the following information
; $Array[0] - ControlID of the GUI created
; $Array[1] - ControlID of the ProgressBar control
; $Array[2] - ControlID of the label
; Failure - 0 and @error to 1 if the GUI couldn't be created
;
; Author ........: Bob Marotte (BrewManNH)
; Remarks .......: This will create a customizable GUI with a progress bar. The default style of the progress bar using this function is the
; Marquee style of progress bar. If you call this function with any positive, non-zero number in the $s_MarqueeType
; parameter it will use the normal progress bar style. All optional parameters will accept the "Default" keyword, an empty
; string "", or -1 if passed to the function. Use the return value to delete the GUI when you're done using it
; (ex. GUIDelete($Returnvalue[0]))
; Related .......: None
; Link ..........:
; Example .......: No
; =============================================================================================================================== -
[autoit]
If WinExists ("SplashWindow","") Then
[/autoit]
IsArray($PBMarquee[2])
GUICtrlSetData($PBMarquee[2], $ReadLine)
$PBMarquee[2] ist der GuiCtrlCreateLabel Variable im UDF...ERROR:
[autoit](273) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.:
[/autoit]
GUICtrlSetData($PBMarquee[2], $ReadLine)
GUICtrlSetData(^ ERROR
[autoit]
NO ERROR:If WinExists ("SplashWindow","") Then
[/autoit]
IsArray($PBMarquee)
GUICtrlSetData($PBMarquee, $ReadLine)jedoch aktualisiert es sich natürlich net ....
-
Spoiler anzeigen
[autoit]Func _ProgressGUI($s_MsgText = "Text Message", $s_MarqueeType = 0, $i_Fontsize = 14, $s_Font = "Arial", $i_XSize = 290, $i_YSize = 100, $b_GUIColor = -1, $b_FontColor = -1)
[/autoit]
Local $PBMarquee[3]
;~ UDF Constants so no includes are needed
Local Const $PG_WS_POPUP = 0x80000000 ; same as the $WS_POPUP constant in WindowsConstants.au3
Local Const $PG_WS_DLGFRAME = 0x00400000 ; same as the $WS_DLGFRAME constant in WindowsConstants.au3
Local Const $PG_PBS_MARQSMTH = 9 ; BitOr of $PBS_SMOOTH and $PBS_MARQUEE
Local Const $PG_PBS_SMTH = 1 ; same as the $PBS_SMOOTH constant in ProgressConstants.au3
Local Const $PG_PBM_SETMARQUEE = 1034 ; same as the $PBM_SETMARQUEE constant in ProgressConstants.au3
; bounds checking/correcting
If $i_Fontsize = "" Or $i_Fontsize = Default Or $i_Fontsize = "-1" Then $i_Fontsize = 14 ; use the default setting of 14 for font size
If $i_Fontsize < 1 Then $i_Fontsize = 1 ; minimum font size is 1
If $i_XSize = "" Or $i_XSize = "-1" Or $i_XSize = Default Then $i_XSize = 290 ; use the default setting for X dimension of the GUI
If $i_XSize < 80 Then $i_XSize = 80 ; minimum X dimension is 80
If $i_XSize > @DesktopWidth - 50 Then $i_XSize = @DesktopWidth - 50 ; maximum X dimension is Desktop Width - 50
If $i_YSize = "" Or $i_YSize = "-1" Or $i_YSize = Default Then $i_YSize = 100 ; use the default setting for Y dimension of the GUI
If $i_YSize > @DesktopHeight - 50 Then $i_YSize = @DesktopHeight - 50 ; maximum y dimension is Desktop Height - 50
If $s_Font = "" Or $s_Font = "-1" Or $s_Font = "Default" Then $s_Font = "Arial" ; use the default font type
;create the GUI
$PBMarquee[0] = GUICreate("SplashWindow", $i_XSize, $i_YSize, -1, -1, BitOR($PG_WS_DLGFRAME, $PG_WS_POPUP))
If @error Then Return SetError(@error, 0, 0) ; if there's any error with creating the GUI, return the error code
Switch $b_GUIColor ; background color of the GUI
Case "-1", Default; Used to set the default color
GUISetBkColor(0x00080FF, $PBMarquee[0])
Case ""
; don't set a default color, use the theme's coloring
Case Else ; set the BG color of the GUI to the user provided color
GUISetBkColor($b_GUIColor, $PBMarquee[0])
EndSwitch
; Create the progressbar
;~ If $s_MarqueeType < 1 Then ; if $s_MarqueeType < 1 then use the Marquee style progress bar
;~ $PBMarquee[1] = GUICtrlCreateProgress(20, $i_YSize - 20, $i_XSize - 40, 15, $PG_PBS_MARQSMTH) ; uses the $PBS_SMOOTH and $PBS_MARQUEE style
;~ GUICtrlSendMsg($PBMarquee[1], $PG_PBM_SETMARQUEE, True, 20) ; change last parameter to change update speed of marquee style PB
;~ Else ; If $s_MarqueeType > 0 then use the normal style progress bar
;~ $PBMarquee[1] = GUICtrlCreateProgress(20, $i_YSize - 20, $i_XSize - 40, 15, $PG_PBS_SMTH) ; Use the $PBS_SMOOTH style
;~ EndIf
; Create the label
$PBMarquee[2] = GUICtrlCreateLabel($s_MsgText, 1, 1, $i_XSize, $i_YSize) ; create the label for the GUI
GUICtrlSetFont($PBMarquee[2], $i_Fontsize, 400, Default, $s_Font)
Switch $b_FontColor
Case "-1", Default; Used to set the default color of the label
GUICtrlSetColor($PBMarquee[2], 0x0FFFC19)
Case ""
; don't set a default color, use the theme's coloring
Case Else
GUICtrlSetColor($PBMarquee[2], $b_FontColor)
EndSwitch
GUISetState()
Return SetError(0, 0, $PBMarquee) ;Return an array containing the ControlIDs of the GUI, Progress bar, and the Label (in that order)
EndFunc ;==>_ProgressGUIhab im UDF isArray überprüft und in meinem script
Meins: (26) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.:
IsArray ($PBMarquee[2])
IsArray (^ ERRORUDF: (49) : ==> Duplicate function name.:
Func _ProgressGUI($s_MsgText = "Text Message", $s_MarqueeType = 0, $i_Fontsize = 14, $s_Font = "Arial", $i_XSize = 290, $i_YSize = 100, $b_GUIColor = -1, $b_FontColor = -1)ein deklarietes Array würde doch so aussehen wenn ich recht habe: Local $Array2D[0][1]
wenn ja dann hatt es der UDF nicht.... -
ja wenn der GuiCtrlSetState ($variable[2], $variable1) funktionieren würde währe die sache schon gegessen
es will halt den [2] nicht mit anerkennen, also keine ahnung wie ich das sonst noch anders ausdrücken soll.So ein Error kriege ich
(270) : ==> Subscript used on non-accessible variable.:
GUICtrlSetData ($SplashInLabel[2], $ReadLine)
GUICtrlSetData ($SplashInLabel^ ERRORBenutze ISN AutoIT Studio
-
das script ist für ein anderes programm geschreiben, ohne dies hilft es auch net weiter deswegen nur der eine Teil
hmm ja schon, Halt statt ein SplashTextOn ("","","","") soll das ein Gui fenster das nur aussieht wie ein SplashBox sein., es soll natürlich nicht bei jedem erneutem jeweiligem tastendruck in dem fall halt "F2" ein neues GUI erstellen, sondern nur den geöffneten aktualisieren.
Leider nicht wenn ich das richtig verstanden habe mit dem GUiSwitch, ich brauche im end efekt den Variable von der GuiCtrlCreateLabel im UDF, da sie jedoch den Variable
[autoit]$PBMarquee[2]
[/autoit]Hatt kann ich es nicht im GuiCtrlSetData nicht einsetzen wegen der Array [2] (kriege da ein ERROR) jedoch braucht der UDF den array da es nur damit geht das man die GUI bewegen kann...
[autoit]$PBMarquee[2] = GUICtrlCreateLabel($s_MsgText, 1, 1, $i_XSize, $i_YSize) ; create the label for the GUI
[/autoit] -
ORIGINAL:
Spoiler anzeigen
[autoit]#include-once
[/autoit]
; #FUNCTION# ====================================================================================================================
; Name...........: _ProgressGui
; Description ...: A small splash screen type GUI with a progress bar and a configurable label
; Syntax.........: _ProgressGUI($s_MsgText = "Text Message", $s_MarqueeType = 0, $i_Fontsize = 14, $s_Font = "Arial", $i_XSize = 290, $i_YSize = 100, $b_GUIColor = -1, $b_FontColor = -1)
; Parameters ....: $s_MsgText - Text to display on the GUI
; $s_MarqueeType - [optional] Style of Progress Bar you want to use
; 0 = Marquee style [default]
; 1 = Normal Progress Bar style
; $i_Fontsize - [optional] The font size that you want to display the $s_MsgText at [default = 14]
; $s_Font - [optional] The font you want the message to use [default = "Arial"]
; $i_XSize - [optional] Width of the GUI [Default = 290] - Minimum size is 80
; $i_YSize - [optional] Height of the GUI [Default = 100] - Minimum size is 100
; $b_GUIColor - [optional] Background color of the GUI [default = 0x00080FF = Blue]
; $s_FontColor - [optional] Color of the text message [default = 0x0FFFC19 = Yellow]
; Return values .: Success - An array containing the following information
; $Array[0] - ControlID of the GUI created
; $Array[1] - ControlID of the ProgressBar control
; $Array[2] - ControlID of the label
; Failure - 0 and @error to 1 if the GUI couldn't be created
;
; Author ........: Bob Marotte (BrewManNH)
; Remarks .......: This will create a customizable GUI with a progress bar. The default style of the progress bar using this function is the
; Marquee style of progress bar. If you call this function with any positive, non-zero number in the $s_MarqueeType
; parameter it will use the normal progress bar style. All optional parameters will accept the "Default" keyword, an empty
; string "", or -1 if passed to the function. Use the return value to delete the GUI when you're done using it
; (ex. GUIDelete($Returnvalue[0]))
; Related .......: None
; Link ..........:
; Example .......: No
; ===============================================================================================================================
Func _ProgressGUI($s_MsgText = "Text Message", $s_MarqueeType = 0, $i_Fontsize = 14, $s_Font = "Arial", $i_XSize = 290, $i_YSize = 100, $b_GUIColor = -1, $b_FontColor = -1)
Local $PBMarquee[3]
;~ UDF Constants so no includes are needed
Local Const $PG_WS_POPUP = 0x80000000 ; same as the $WS_POPUP constant in WindowsConstants.au3
Local Const $PG_WS_DLGFRAME = 0x00400000 ; same as the $WS_DLGFRAME constant in WindowsConstants.au3
Local Const $PG_PBS_MARQSMTH = 9 ; BitOr of $PBS_SMOOTH and $PBS_MARQUEE
Local Const $PG_PBS_SMTH = 1 ; same as the $PBS_SMOOTH constant in ProgressConstants.au3
Local Const $PG_PBM_SETMARQUEE = 1034 ; same as the $PBM_SETMARQUEE constant in ProgressConstants.au3
; bounds checking/correcting
If $i_Fontsize = "" Or $i_Fontsize = Default Or $i_Fontsize = "-1" Then $i_Fontsize = 14 ; use the default setting of 14 for font size
If $i_Fontsize < 1 Then $i_Fontsize = 1 ; minimum font size is 1
If $i_XSize = "" Or $i_XSize = "-1" Or $i_XSize = Default Then $i_XSize = 290 ; use the default setting for X dimension of the GUI
If $i_XSize < 80 Then $i_XSize = 80 ; minimum X dimension is 80
If $i_XSize > @DesktopWidth - 50 Then $i_XSize = @DesktopWidth - 50 ; maximum X dimension is Desktop Width - 50
If $i_YSize = "" Or $i_YSize = "-1" Or $i_YSize = Default Then $i_YSize = 100 ; use the default setting for Y dimension of the GUI
If $i_YSize > @DesktopHeight - 50 Then $i_YSize = @DesktopHeight - 50 ; maximum y dimension is Desktop Height - 50
If $i_YSize < 100 Then $i_YSize = 100 ; minimum Y dimension is 100
If $s_Font = "" Or $s_Font = "-1" Or $s_Font = "Default" Then $s_Font = "Arial" ; use the default font type
;create the GUI
$PBMarquee[0] = GUICreate("", $i_XSize, $i_YSize, -1, -1, BitOR($PG_WS_DLGFRAME, $PG_WS_POPUP))
If @error Then Return SetError(@error, 0, 0) ; if there's any error with creating the GUI, return the error code
Switch $b_GUIColor ; background color of the GUI
Case "-1", Default; Used to set the default color
GUISetBkColor(0x00080FF, $PBMarquee[0])
Case ""
; don't set a default color, use the theme's coloring
Case Else ; set the BG color of the GUI to the user provided color
GUISetBkColor($b_GUIColor, $PBMarquee[0])
EndSwitch
; Create the progressbar
If $s_MarqueeType < 1 Then ; if $s_MarqueeType < 1 then use the Marquee style progress bar
$PBMarquee[1] = GUICtrlCreateProgress(20, $i_YSize - 20, $i_XSize - 40, 15, $PG_PBS_MARQSMTH) ; uses the $PBS_SMOOTH and $PBS_MARQUEE style
GUICtrlSendMsg($PBMarquee[1], $PG_PBM_SETMARQUEE, True, 20) ; change last parameter to change update speed of marquee style PB
Else ; If $s_MarqueeType > 0 then use the normal style progress bar
$PBMarquee[1] = GUICtrlCreateProgress(20, $i_YSize - 20, $i_XSize - 40, 15, $PG_PBS_SMTH) ; Use the $PBS_SMOOTH style
EndIf
; Create the label
$PBMarquee[2] = GUICtrlCreateLabel($s_MsgText, 20, 20, $i_XSize - 40, $i_YSize - 45) ; create the label for the GUI
GUICtrlSetFont($PBMarquee[2], $i_Fontsize, 400, Default, $s_Font)
Switch $b_FontColor
Case "-1", Default; Used to set the default color of the label
GUICtrlSetColor($PBMarquee[2], 0x0FFFC19)
Case ""
; don't set a default color, use the theme's coloring
Case Else
GUICtrlSetColor($PBMarquee[2], $b_FontColor)
EndSwitch
GUISetState()
Return SetError(0, 0, $PBMarquee) ;Return an array containing the ControlIDs of the GUI, Progress bar, and the Label (in that order)
EndFunc ;==>_ProgressGUI
Meine Variante (Was ich brauche) den Progressbar hab ich ausgelassen....Spoiler anzeigen
[autoit]Func _ProgressGUI($s_MsgText = "Text Message", $s_MarqueeType = 0, $i_Fontsize = 14, $s_Font = "Arial", $i_XSize = 290, $i_YSize = 100, $b_GUIColor = -1, $b_FontColor = -1)
[/autoit]
Local $PBMarquee[3]
;~ UDF Constants so no includes are needed
Local Const $PG_WS_POPUP = 0x80000000 ; same as the $WS_POPUP constant in WindowsConstants.au3
Local Const $PG_WS_DLGFRAME = 0x00400000 ; same as the $WS_DLGFRAME constant in WindowsConstants.au3
Local Const $PG_PBS_MARQSMTH = 9 ; BitOr of $PBS_SMOOTH and $PBS_MARQUEE
Local Const $PG_PBS_SMTH = 1 ; same as the $PBS_SMOOTH constant in ProgressConstants.au3
Local Const $PG_PBM_SETMARQUEE = 1034 ; same as the $PBM_SETMARQUEE constant in ProgressConstants.au3
; bounds checking/correcting
If $i_Fontsize = "" Or $i_Fontsize = Default Or $i_Fontsize = "-1" Then $i_Fontsize = 14 ; use the default setting of 14 for font size
If $i_Fontsize < 1 Then $i_Fontsize = 1 ; minimum font size is 1
If $i_XSize = "" Or $i_XSize = "-1" Or $i_XSize = Default Then $i_XSize = 290 ; use the default setting for X dimension of the GUI
If $i_XSize < 80 Then $i_XSize = 80 ; minimum X dimension is 80
If $i_XSize > @DesktopWidth - 50 Then $i_XSize = @DesktopWidth - 50 ; maximum X dimension is Desktop Width - 50
If $i_YSize = "" Or $i_YSize = "-1" Or $i_YSize = Default Then $i_YSize = 100 ; use the default setting for Y dimension of the GUI
If $i_YSize > @DesktopHeight - 50 Then $i_YSize = @DesktopHeight - 50 ; maximum y dimension is Desktop Height - 50
If $s_Font = "" Or $s_Font = "-1" Or $s_Font = "Default" Then $s_Font = "Arial" ; use the default font type
;create the GUI
$PBMarquee[0] = GUICreate("SplashWindow", $i_XSize, $i_YSize, -1, -1, BitOR($PG_WS_DLGFRAME, $PG_WS_POPUP))
If @error Then Return SetError(@error, 0, 0) ; if there's any error with creating the GUI, return the error code
Switch $b_GUIColor ; background color of the GUI
Case "-1", Default; Used to set the default color
GUISetBkColor(0x00080FF, $PBMarquee[0])
Case ""
; don't set a default color, use the theme's coloring
Case Else ; set the BG color of the GUI to the user provided color
GUISetBkColor($b_GUIColor, $PBMarquee[0])
EndSwitch
; Create the progressbar
;~ If $s_MarqueeType < 1 Then ; if $s_MarqueeType < 1 then use the Marquee style progress bar
;~ $PBMarquee[1] = GUICtrlCreateProgress(20, $i_YSize - 20, $i_XSize - 40, 15, $PG_PBS_MARQSMTH) ; uses the $PBS_SMOOTH and $PBS_MARQUEE style
;~ GUICtrlSendMsg($PBMarquee[1], $PG_PBM_SETMARQUEE, True, 20) ; change last parameter to change update speed of marquee style PB
;~ Else ; If $s_MarqueeType > 0 then use the normal style progress bar
;~ $PBMarquee[1] = GUICtrlCreateProgress(20, $i_YSize - 20, $i_XSize - 40, 15, $PG_PBS_SMTH) ; Use the $PBS_SMOOTH style
;~ EndIf
; Create the label
$PBMarquee[2] = GUICtrlCreateLabel($s_MsgText, 1, 1, $i_XSize, $i_YSize) ; create the label for the GUI
GUICtrlSetFont($PBMarquee[2], $i_Fontsize, 400, Default, $s_Font)
Switch $b_FontColor
Case "-1", Default; Used to set the default color of the label
GUICtrlSetColor($PBMarquee[2], 0x0FFFC19)
Case ""
; don't set a default color, use the theme's coloring
Case Else
GUICtrlSetColor($PBMarquee[2], $b_FontColor)
EndSwitch
GUISetState()
Return SetError(0, 0, $PBMarquee) ;Return an array containing the ControlIDs of the GUI, Progress bar, and the Label (in that order)
EndFunc ;==>_ProgressGUITACH,
kleines problem wie eh und jeh....
ich will diese kleine UDF _ProgressGUI.au3 benutzen, was auf dieser seite zu finden ist:
[url='' [url']http://www.autoitscript.com/forum/topic/12…h-progress-bar/[/url]']Customizable-Splash-Screen-GUI-with-Progress-bar[/url]Jedoch mache ich da entweder was falsch, oder ich muss was anderes probieren... und zwar
ich will das bei einer Tasten druck dieses kleine Splash Screen angezeigt wird was ein GUI ist. Jedoch wenn es dies tut soll es beim nexten tasten druck den Label Aktualisieren ohne das sich der GUI Komplett schliest und wieder auftaucht.
Was ich aus dieser UDF brauche ist halt das man den Background color, Font Color, etc ändern kann und das er mit der Maus Moveable ist also bewegbar...Hab eigentlich mehr oder weniger alles geschaft jedocht wenn ich es schaffe es zu bewegen aktualisiert der Label nicht...
und wenn ich es schaffe es zu aktualisieren ist er nicht mehr bewegbar....Ich brauche die Variable in der UDF
[autoit]$PBMarquee[2]
[/autoit]
$PBMarquee[2] = GUICtrlCreateLabel($s_MsgText, 1, 1, $i_XSize, $i_YSize) ; create the label for the GUI
[autoit]
jedoch wegen der [2] tut der Nichts -.-GUICtrlSetData ($PBMarquee[2], $ReadLine)
[/autoit]Hättet ihr da eine idee was man an der UDF ändern kann ohne die Funktionen zu verlieren???
Meine Kleine Funktion : Soll als SplashBox dienen da man mit SplashTextOn nicht sehr viel machen kann...Spoiler anzeigen
[autoit];============================================================================================================
[/autoit] [autoit][/autoit] [autoit]
; F2 KEY
;============================================================================================================
Func _F2Key()$Xpos = IniRead(@ScriptDir & "\config.ini", "Coordinates_X", "X", "")
[/autoit] [autoit][/autoit] [autoit]
$Ypos = IniRead(@ScriptDir & "\config.ini", "Coordinates_Y", "Y", "")
$time = IniRead(@ScriptDir & "\config.ini", "Time", "milliseconds", "")If WinExists ("SplashWindow","") Then
[/autoit] [autoit][/autoit] [autoit]
GUICtrlSetData ($SplashInLabel, $ReadLine)ElseIf not WinExists ("SplashWindow","") Then
[/autoit] [autoit][/autoit] [autoit]
;~ _ProgressGUI($readline,"",Fontsize, $s_Font, $i_XSize, $i_YSize, $b_GUIColor, $b_FontColor)
$CustomSplash = _ProgressGUI($ReadLine, 1, 20, "", 330, 50, 1, 0xE35522)
GUICtrlSetStyle($CustomSplash, -1, 0x00100000) ;<<<<<<<<<<<<<<< This makes the first GUI movable with the mouse
WinSetOnTop("SplashWindow", "", 1)
EndIf
Sleep($time)
SplashOff()If $time = 0 Then
[/autoit]
$time = IniRead(@ScriptDir & "\config.ini", "Time", "milliseconds", "")
SplashTextOn("", $ReadLine, 250, 45, $Xpos, $Ypos, 1, "", 12, 800)
EndIf
EndFunc ;==>_F2Key
;~ **********************************************************************************************************und hier ein kleines Example was der Autor gebastelt hat... Müsst ihr net selber raussuchen
Spoiler anzeigen
[autoit]#include "_ProgressGUI.au3"
[/autoit] [autoit][/autoit] [autoit]
$Return = _ProgressGUI("This is a test message xxxxxxxxxxxxxxx xxxxxxxxxxxxx", 1, 30, "", 400, 300);, 4, 6)
GUICtrlSetStyle($Return[2], -1, 0x00100000) ;<<<<<<<<<<<<<<< This makes the first GUI movable with the mouse
For $I = 1 To 100
GUICtrlSetData($Return[1], $I)Sleep(200)
[/autoit]
If Mod($I, 2) Then GUISetBkColor(Random(0, 32767, 1), $Return[0])
Next
Sleep(2000)
GUIDelete($Return[0])
$Return = _ProgressGUI()
Sleep(4000)p.s. kann vorkommen das paar Variablen nicht einstimmen, da ich viel probiert habe