Du könntes noch bitte das Präfix deines Themas auf [gelöst] setzen. Und das nächste mal wähle doch eine informative Überschrift und nicht einen mysteriösen Buchtitel...
Hast ja recht ...
Du könntes noch bitte das Präfix deines Themas auf [gelöst] setzen. Und das nächste mal wähle doch eine informative Überschrift und nicht einen mysteriösen Buchtitel...
Hast ja recht ...
Super
beide varianten funktionieren... aber ich entscheide mich für die von Xeno.
Diese erscheint mir leichter. :p
Ihr seid klasse!
wäre ich nie drauf gekommen.
Vielen Dank
// EDIT:
Eins A, mit der variante von Xeno konnte ich es fertigstellen.
Aber auch Oscar bekommt einen.... Keks!
Danke euch.
Nun kann ich in Paint gerade striche mit der Tastatur ziehen!!!
unter anderem.. HAHA!
Da ist mal ein Problem gelöst..
schon taucht das nächste auf, diesmal jedoch etwas... anderes.
Theoretisch sollte dieses "Problem" so, garnicht vorhanden sein.
Um es aber besser zu verstehen solltet ihr den Script tatsächlich selber mal ausführen.
Beispiel:
Wählt als Function: Combo WASD
als Direction: Combo
und als Distance: am besten 1
nun klickt auf "Done"..
Was nun passiert ist merkwürdig.. und zwar..
Drückt man "W" bewegt sich die Maus wie gewollt nach oben.. JEDOCH ... nicht mit dem gleichen Tempo wie zb: "A", "S" oder "D" ...
bei mir ist "A" am schnellsten.. Danach kommt "W" und "D" ... "S" ist am langsamsten..
Das selbe stelle ich bei Combo ARROW fest.
jedoch ist da "Up" am schnellsten, gefolgt von "Left" und "Right", die sich die selbe geschwindigkeit teilen... nur "Down" ist wieder am langsamsten.
Nun die ultimative Frage:
Warum?
Am script kann es doch nicht liegen, oder?
Übersehe ich was?
Bin sehr auf eure antworten gespannt..
Falls sich wer dazu äußern kann.
Script:
#cs ----------------------------------------------------------------------------
AutoIt Version: 3.3.8.1
Author: ThirtySix
Script Function:
MouseMove
#ce ----------------------------------------------------------------------------
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <Misc.au3>
Opt("GuiOnEventMode", 1)
[/autoit] [autoit][/autoit] [autoit]#Region ### START Koda GUI section ### Form=
$MouseMove = GUICreate("MouseMove", 227, 124, 461, 286)
GUISetBkColor(0x9DB9EB)
$Done = GUICtrlCreateButton("Done", 16, 14, 75, 25)
$Info = GUICtrlCreateButton("Info", 16, 78, 75, 25)
$PressedKey = GUICtrlCreateCombo("", 104, 16, 105, 25, BitOR($GUI_SS_DEFAULT_COMBO,$CBS_SIMPLE))
GUICtrlSetData(-1, "M1|M2|M3|Shift|CTRL|W|A|S|D|Up|Down|Left|Right|Combo WASD|Combo ARROW")
GUICtrlSendMsg($PressedKey, 0x1703, 0, "Function")
$PosDir = GUICtrlCreateCombo("", 104, 48, 105, 25, BitOR($GUI_SS_DEFAULT_COMBO,$CBS_SIMPLE))
GUICtrlSetData(-1, "Up|Down|Left|Right|Combo")
GUICtrlSendMsg($PosDir, 0x1703, 0, "Direction")
$Far = GUICtrlCreateCombo("", 104, 80, 105, 25, BitOR($GUI_SS_DEFAULT_COMBO,$CBS_SIMPLE))
GUICtrlSetData(-1, "1|2|5|10|25|50|75|100|150|250|350|500|750|1000|2000|5000|")
GUICtrlSendMsg($Far, 0x1703, 0, "Distance")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")
GUICtrlSetOnEvent($Done, "_Done")
GUICtrlSetOnEvent($Info, "_Info")
Global $WKey, $AKey, $SKey, $DKey, $UpKey, $DownKey, $LeftKey, $RightKey, $xKey, $Key, $Dir, $pos, $x, $y, $DLL = DllOpen("user32.dll")
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]While 1
If _IsPressed($xKey, $DLL) Then
$pos = MouseGetPos()
If $Dir = "Up" OR $Dir = "Left" Then
MouseMove($pos[0]-$x, $pos[1]-$y)
EndIf
If $Dir = "Down" OR $Dir = "Right" Then
MouseMove($pos[0]+$x, $pos[1]+$y)
EndIf
EndIf
If _IsPressed($WKey, $DLL) Then
$pos = MouseGetPos()
MouseMove($pos[0], $pos[1]-$y)
EndIf
If _IsPressed($AKey, $DLL) Then
$pos = MouseGetPos()
MouseMove($pos[0]-$x, $pos[1])
EndIf
If _IsPressed($SKey, $DLL) Then
$pos = MouseGetPos()
MouseMove($pos[0], $pos[1]+$y)
EndIf
If _IsPressed($DKey, $DLL) Then
$pos = MouseGetPos()
MouseMove($pos[0]+$x, $pos[1])
EndIf
If _IsPressed($UpKey, $DLL) Then
$pos = MouseGetPos()
MouseMove($pos[0], $pos[1]-$y)
EndIf
If _IsPressed($LeftKey, $DLL) Then
$pos = MouseGetPos()
MouseMove($pos[0]-$x, $pos[1])
EndIf
If _IsPressed($DownKey, $DLL) Then
$pos = MouseGetPos()
MouseMove($pos[0], $pos[1]+$y)
EndIf
If _IsPressed($RightKey, $DLL) Then
$pos = MouseGetPos()
MouseMove($pos[0]+$x, $pos[1])
EndIf
Wend
Func _Done()
if GUICtrlRead($Done) = "Done" Then
If GUICtrlRead($PressedKey) = "" OR GUICtrlRead($PosDir) = "" OR GUICtrlRead($Far) = "" Then
MsgBox(0,"error","First: Setup"&@CRLF&"Then: Done")
Else
$Key = GUICtrlRead($PressedKey)
$Dir = GUICtrlRead($PosDir)
$Farcheck = GUICtrlRead($Far)
GUICtrlSetData($Done,"Reset")
If $Key = "M1" Then $xKey = 01
If $Key = "M2" Then $xKey = 02
If $Key = "M3" Then $xKey = 04
If $Key = "Shift" Then $xKey = 10
If $Key = "CTRL" Then $xKey = 11
If $Key = "W" Then $xKey = 57
If $Key = "A" Then $xKey = 41
If $Key = "S" Then $xKey = 53
If $Key = "D" Then $xKey = 44
If $Key = "Up" Then $xKey = 26
If $Key = "Down" Then $xKey = 28
If $Key = "Left" Then $xKey = 25
If $Key = "Right" Then $xKey = 27
If $Key = "Combo WASD" Then
$WKey = 57
$AKey = 41
$SKey = 53
$DKey = 44
GUICtrlSetData($PosDir,"Combo")
$Dir = "ALL"
EndIf
If $Key = "Combo ARROW" Then
$UpKey = 26
$DownKey = 28
$LeftKey = 25
$RightKey = 27
GUICtrlSetData($PosDir,"Combo")
$Dir = "ALL"
EndIf
If $Dir = "Up" Or $Dir = "Down" Then $y = $Farcheck
If $Dir = "Left" Or $Dir = "Right" Then $x = $Farcheck
If $Dir = "ALL" Then
$x = $Farcheck
$y = $Farcheck
EndIf
GUICtrlSetState($PosDir, $GUI_DISABLE)
GUICtrlSetState($PressedKey, $GUI_DISABLE)
GUICtrlSetState($Far, $GUI_DISABLE)
;~ MsgBox(0,"",$WKey&"=W "&$AKey&"=A "&$SKey&"=S "&$DKey&"=D "&$UpKey&"=up "&$DownKey&"=down "&$LeftKey&"=left "&$RightKey&"=right "&$xKey&"=xkey "&$Key&"=key "&$Dir&"=dir "&$x&"=x "&$y&"=y "&$Farcheck&"=FC")
EndIf
Else
$x = ""
$y = ""
$Key = ""
$WKey = ""
$AKey = ""
$SKey = ""
$DKey = ""
$UpKey = ""
$DownKey = ""
$LeftKey = ""
$RightKey = ""
$Dir = ""
$xKey = ""
$Farcheck = ""
GUICtrlSetData($Done,"Done")
GUICtrlSetData($PressedKey,"")
GUICtrlSetData($PressedKey, "M1|M2|M3|Shift|CTRL|W|A|S|D|Up|Down|Left|Right|Combo WASD|Combo ARROW")
GUICtrlSetData($PosDir,"")
GUICtrlSetData($PosDir, "Up|Down|Left|Right|Combo")
GUICtrlSetData($Far,"")
GUICtrlSetData($Far, "1|2|5|10|25|50|75|100|150|250|350|500|750|1000|2000|5000|")
GUICtrlSetState($PosDir, $GUI_ENABLE)
GUICtrlSetState($PressedKey, $GUI_ENABLE)
GUICtrlSetState($Far, $GUI_ENABLE)
EndIf
EndFunc
Func _Info()
MsgBox(0, "MouseMove", "Coded by ThirtySix")
EndFunc
Func _Exit()
DllClose($DLL)
Exit
EndFunc
Versuch mal 0x1703
WTF...
d... das isses..
D... Danke...
Jetzt bist du mir aber ne erklärung schuldig mein freund..
wieso genau diese Zahl?
und woher hast du sie?
..
das muss jetzt geklärt werden bis ichs verstanden habe
Das aber schon echt n großer aufwand für das kleine ergebniss..
ich glaub dann spar ich mir das <_<
// EDIT:
Aber vllt brauch ich das mal für ein etwas wichtigeres projekt ..
ich werds aufjedenfall im hinterkopf behalten das es diese möglichkeit so gibt.
Danke
okay da bin ich mal gespannt
Ja ich bin auch schon am überlegen ob es das ist..
wäre ja echt schade..
aber ich hoffe noch auf die lösung von einem Genie ... :p
treiben sich ja ein paar davon rum hier..
hab ich gehört
Ich fass mich mal kurz:
Ich brauche Hilfe bei GUICtrlSendMsg.
Und zwar will ich das
$PressedKey = GUICtrlCreateCombo("", 104, 16, 105, 25, BitOR($GUI_SS_DEFAULT_COMBO,$CBS_SIMPLE))
GUICtrlSetData(-1, "M1|M2|M3|Shift|CTRL|W|A|S|D|Up|Down|Left|Right|Combo WASD|Combo ARROW")
genauso funktioniert wie
$Time = GUICtrlCreateInput("", 16, 16, 65, 24, BitOR($ES_CENTER, $ES_NUMBER))
GUICtrlSendMsg($Time, 0x1501, 0, "Zeitwert")
also quasi.
In der Combobox soll sowas wie "Set Key" oder so stehen.
Bis man mit der Maus reinklickt.
Wenn man nichts ausgewählt hat.. soll das "Set Key" wieder automatisch erscheinen.
Bis jetzt konnte ich einfach nichts dazu finden.
Auch in der Shoutbox konnte mir niemand helfen..
daher wurde mir geraten ein Thread aufzumachen.
und nein:
[autoit]
$PressedKey = GUICtrlCreateCombo("", 104, 16, 105, 25, BitOR($GUI_SS_DEFAULT_COMBO,$CBS_SIMPLE))
GUICtrlSetData(-1, "M1|M2|M3|Shift|CTRL|W|A|S|D|Up|Down|Left|Right|Combo WASD|Combo ARROW", "Key")
kommt nicht in frage.
Ich hoffe irgendjemand weiß wie ich das hinbekomme.
Jap .. jetzt passts.
fand meins aber trotzdem auch gut...
ich werd mal versuchen deins richtig zu verstehen...
wünsch mir glück!
oh hoppalla.
Dann in _Start() diese Zeile ändern
[...]
Das is Lustig.. dann werden nach jedem klick auf "weiter" aus 5min ... gleich mal 5 stunden..
So meine Version:[...]
Bei mir ist der Info-Button immer aktiv, warum sollte er auch inaktiv sein.
Sehr schön ..
Aber is dir beim testen nicht aufgefallen, dass wenn der Countdown Zählt und du auf "Stop" drückst.. und dann wieder auf "Weiter"
der sofort auf "0" springt und dann ins Minus zählt ?
Das war das erste was mir aufgefallen is ..
//Edit:
verstehen tuh ichs trotzdem nicht..
Und wenn es abgelaufen ist, soll man selber noch auf Stop drücken???Sleep würde ich dafür nicht nehmen, dass ist zu ungenau und Prozessorabhängig.
Die Timer UDF macht da mehr Sinn. Zudem es der auch nicht interessiert, wenn man das Fenster bewegt.
Ich hab keine Ahnung wovon du sprichst..
Aber.. auf Stop drücken brauch man nichtmehr.. wenn auf 0 ist dann Shutdown(5)
Dann is Pc aus und alles egal
Das is nur weil ich mein Pc nicht über Nacht laufen lassen will aber meist mit nem Film oder Musik ins Bett geh..
(nein ich habe seit 6 Jahren keinen Fernsehr mehr. - wirst eh nur bekloppt von der Werbung )
Wie dem auch sei.. wenn du Lust und Zeit hast.. kannst du mir gern den Script umschreiben..
Ich werd versuchen es zu verstehen
Im grunde reicht das für mich so.. da ich das Fenster ja weder verschiebe noch sonst was..
Also ist zuverlässig genug..
Aber ich fänds trotzdem gut mehr zu lernen also.. erzähl.. wie würdest du das machen ?
Erstmal Danke euch beiden..
nun hab ich ne Grundidee..
aber Ich steh heute irgendwie aufm Schlauch...
Weiß nichtmal was davon in die Schleife muss..
Aber ich berichte mein Ergebniss sobald ich ne Lösung hab..
Danke schonmal
//Edit:
okay nun bin ich schonmal soweit..
dem Ziel ganz Nah! ..
$sekunden = 305 ; Beispiel
[/autoit] [autoit][/autoit] [autoit]While 1
Sleep (1000)
$sekunden -=1
$h = Int($sekunden / 3600)
$s = $sekunden - ($h * 3600)
$m = Int($s / 60)
$s = $s - ($m * 60)
ConsoleWrite($h & ":" & $m & ":" & $s & @CRLF)
WEnd
//Edit2:
Wahrscheinlich wollt Ihr mich dafür jetzt Schänden oder so
aber ich hab immerhin eine Lösung..
$sekunden = 305 ; Beispiel
While 1
Sleep (1000)
$sekunden -=1
$h = Int($sekunden / 3600)
$s = $sekunden - ($h * 3600)
$m = Int($s / 60)
$s = $s - ($m * 60)
If $h < 10 then
$h0 = "0"
Else
$h0 = ""
EndIf
If $m < 10 then
$m0 = "0"
Else
$m0 = ""
EndIf
If $s < 10 then
$s0 = "0"
Else
$s0 = ""
EndIf
ConsoleWrite($h0 & $h & ":" & $m0 & $m & ":" & $s0 & $s & @CRLF)
WEnd
und eingebaut im Script..
Danke ... Somit gelöst!
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Opt("GuiOnEventMode", 1)
Global $Active = 0, $In = 1, $Set = ""
#Region ### START Koda GUI section ### Form=
$Shutdown = GUICreate("Shutdown", 180, 124, 567, 326)
GUISetFont(9, 800, 0, "Comic Sans MS")
GUISetBkColor(0x99B4D1)
$Start = GUICtrlCreateButton("Start", 96, 16, 67, 25)
$Stop = GUICtrlCreateButton("Stop", 96, 48, 67, 25)
$Reset = GUICtrlCreateButton("Reset", 96, 80, 67, 25)
$Info = GUICtrlCreateButton("Info", 16, 80, 67, 25)
$Time = GUICtrlCreateInput("", 16, 16, 65, 24, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER,$ES_NUMBER))
$Settings = GUICtrlCreateCombo("", 16, 49, 65, 25, BitOR($GUI_SS_DEFAULT_COMBO,$CBS_SIMPLE))
GUICtrlSetData(-1, "Sek|Min|Std")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")
GUICtrlSetOnEvent($Start, "_Start")
GUICtrlSetOnEvent($Stop, "_Stop")
GUICtrlSetOnEvent($Reset, "_Reset")
GUICtrlSetOnEvent($Info, "_Info")
GUICtrlSetState($Stop, $GUI_DISABLE)
GUICtrlSetState($Reset, $GUI_DISABLE)
While 1
Sleep (1000)
If $Active = 1 Then
$In -=1
$h = Int($In / 3600)
$s = $In - ($h * 3600)
$m = Int($s / 60)
$s = $s - ($m * 60)
If $h < 10 then
$h0 = "0"
Else
$h0 = ""
EndIf
If $m < 10 then
$m0 = "0"
Else
$m0 = ""
EndIf
If $s < 10 then
$s0 = "0"
Else
$s0 = ""
EndIf
GUICtrlSetData($Time, $h0 & $h & ":" & $m0 & $m & ":" & $s0 & $s)
EndIf
If $In = 0 Then
$Active = 0
$In = 1
ConsoleWrite("test")
;~ Shutdown(5)
_Reset()
EndIf
WEnd
Func _Start()
[/autoit] [autoit][/autoit] [autoit]If GUICtrlRead($Start) = "Start" Then
$In = GUICtrlRead($Time)
$Set = GUICtrlRead($Settings)
EndIf
If ($In AND $Set) = "" Then
MsgBox(0,"Fehler", "Die Angaben sind unvollständig.")
Else
GUICtrlSetState($Start, $GUI_DISABLE)
GUICtrlSetState($Stop, $GUI_ENABLE)
GUICtrlSetState($Info, $GUI_DISABLE)
GUICtrlSetState($Reset, $GUI_DISABLE)
GUICtrlSetState($Time, $GUI_DISABLE)
GUICtrlSetState($Settings, $GUI_DISABLE)
If GUICtrlRead($Start) = "Start" Then
If $Set = "Min" Then $In *= 60
If $Set = "Std" Then $In *= 3600
EndIf
$Active = 1
EndIf
EndFunc
Func _Stop()
$Active = 0
GUICtrlSetState($Reset, $GUI_ENABLE)
GUICtrlSetState($Start, $GUI_ENABLE)
GUICtrlSetData($Start, "Weiter")
EndFunc
Func _Reset()
GUICtrlSetData($Time, "")
GUICtrlSetData($Settings, "")
GUICtrlSetData(-1, "Sek|Min|Std")
GUICtrlSetState($Start, $GUI_ENABLE)
GUICtrlSetState($Info, $GUI_ENABLE)
GUICtrlSetData($Start, "Start")
GUICtrlSetState($Stop, $GUI_DISABLE)
GUICtrlSetState($Reset, $GUI_DISABLE)
GUICtrlSetState($Time, $GUI_ENABLE)
GUICtrlSetState($Settings, $GUI_ENABLE)
EndFunc
Func _Info()
MsgBox(0,"By ThirtySix", "v1.0")
EndFunc
Func _Exit()
Exit
EndFunc
Hey Liebe Leute..
Ich bin mal wieder auf ein Problem gestoßen welches sich nicht so einfach lösen lässt..
zumindest nicht für mich..
Mein Script ist zwar schon Fertig und Funktioniert auch Super.
Jedoch hat es einen unschönen Schönheitsfehler.
Momentan ist es so:
Die ausgabe des Timers bzw. des Countdown zählt in Sekunden runter.. also bei zb. 60 Minuten zählt er von 3600 sek. runter..
das geht dann pro Sekunde so weiter .. 3599 ... 3598 ... 3597 ... 3596 ... ich denke ihr versteht..
Eigenbemühungen:
Nun... ich hab einiges versucht mit umrechnungen und If abfragen etc etc..
auch die TimerDiff und TimerInit funktion hab ich mir mehrfach angesehen jedoch versteh ich das einfach nicht so richtig.
Timerinit setzt den start des Timer ab dem gezählt werden soll und TimerDiff gibt dann die verstrichene Zeit aus?!
Wie ich das umsetze? K.a.
Mein Ziel:
Die ausgabe des Timers soll zb. wenn 5 Minuten eingegeben wurde.. nicht von 300 sek runterzählen sondern es so anzeigen 00:05:00
und bei einer Stunde dann eben 01:00:00 ... Quasi im HH: MM: SS Format.
Ich suche möglichst die am einfachsten zu verstehende Lösung..
Aber wenn ich nicht um TimerInit und TimerDiff drumrumkomme..
Bitte ich evtl um ein BeispielScript den ich auch verstehen kann.. sozusagen für Dummies..
Und auch wenn es zuviel verlangt sein mag..
Wäre klasse wenn ihr alles was ihr am Script macht kommentieren würdet.
Mein Script:
Ich hab mir die Kommentare im Script mal gespart denn ich behaupte, ihr versteht den auch ohne.. der ist sehr kurz und einfach :p
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Opt("GuiOnEventMode", 1)
Global $Active = 0, $In = "", $Set = ""
#Region ### START Koda GUI section ### Form=
$Shutdown = GUICreate("Shutdown", 290, 99, 567, 326)
GUISetFont(8, 800, 0, "Comic Sans MS")
GUISetBkColor(0x7A96DF)
; Buttons
$Start = GUICtrlCreateButton("Start", 16, 56, 43, 25)
$Stop = GUICtrlCreateButton("Stop", 80, 56, 43, 25)
$Reset = GUICtrlCreateButton("Reset", 208, 56, 67, 25)
$Info = GUICtrlCreateButton("Info", 144, 56, 43, 25)
; Inputs
$Time = GUICtrlCreateInput("", 16, 16, 169, 24, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER,$ES_NUMBER))
$Settings = GUICtrlCreateCombo("", 208, 17, 65, 25)
GUICtrlSetData(-1, "Sek|Min|Std")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")
GUICtrlSetOnEvent($Start, "_Start")
GUICtrlSetOnEvent($Stop, "_Stop")
GUICtrlSetOnEvent($Reset, "_Reset")
GUICtrlSetOnEvent($Info, "_Info")
GUICtrlSetState($Stop, $GUI_DISABLE)
GUICtrlSetState($Reset, $GUI_DISABLE)
While 1
Sleep (1000)
If $Active = 1 Then
$In -=1
GUICtrlSetData($Time, "Noch "& $In &" sek") ; hier soll quasi der timer schlussendlich als Zb. "01:05:35" ausgegeben werden.
EndIf
If $In = 0 Then
$Active = 0
;~ Shutdown(5)
EndIf
WEnd
Func _Start()
[/autoit] [autoit][/autoit] [autoit]If GUICtrlRead($Start) = "Start" Then
$In = GUICtrlRead($Time)
$Set = GUICtrlRead($Settings)
EndIf
If ($In AND $Set) = "" Then
MsgBox(0,"Fehler", "Die Angaben sind unvollständig.")
Else
GUICtrlSetState($Start, $GUI_DISABLE)
GUICtrlSetState($Stop, $GUI_ENABLE)
GUICtrlSetState($Info, $GUI_DISABLE)
GUICtrlSetState($Reset, $GUI_DISABLE)
GUICtrlSetState($Time, $GUI_DISABLE)
GUICtrlSetState($Settings, $GUI_DISABLE)
If GUICtrlRead($Start) = "Start" Then
If $Set = "Min" Then $In *= 60
If $Set = "Std" Then $In *= 3600
EndIf
$Active = 1
EndIf
EndFunc
Func _Stop()
$Active = 0
GUICtrlSetState($Reset, $GUI_ENABLE)
GUICtrlSetState($Start, $GUI_ENABLE)
GUICtrlSetData($Start, "Weiter")
EndFunc
Func _Reset()
GUICtrlSetData($Time, "")
GUICtrlSetData($Settings, "")
GUICtrlSetData(-1, "Sek|Min|Std")
GUICtrlSetState($Start, $GUI_ENABLE)
GUICtrlSetState($Info, $GUI_ENABLE)
GUICtrlSetData($Start, "Start")
GUICtrlSetState($Stop, $GUI_DISABLE)
GUICtrlSetState($Reset, $GUI_DISABLE)
GUICtrlSetState($Time, $GUI_ENABLE)
GUICtrlSetState($Settings, $GUI_ENABLE)
EndFunc
Func _Info()
MsgBox(0,"By ThirtySix", "v1.0")
EndFunc
Func _Exit()
Exit
EndFunc
Kannst es ja mal so veruschen...
bin selber noch Neu aber so könnte das klappen... o:
Musst deine .wav datei halt am selben Ort / Ordner / Desktop haben wie dein Script.
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
Opt("GUIOnEventMode", 1)
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]#Region ### START Koda GUI section ### Form=
$mainwindow = GUICreate("Programmname", 201, 101, 477, 290)
$Statusbutton = GUICtrlCreateButton("status", 70, 50, 60, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
GUISetOnEvent($GUI_EVENT_CLOSE, "_exit")
GUICtrlSetOnEvent($statusbutton, "_statusbutton")
while 1
Sleep (50)
Wend
Func _StatusButton()
SoundPlay(@ScriptDir&"\Windows Exclamation.wav")
MsgBox(64, "Neues Fenster", "Tolle Musik oder? :)")
SoundPlay("")
EndFunc
Func _exit()
Exit
EndFunc
Danke funktioniert super.
Is es eigendlich irgendwie möglich die .txt Dateien mit in die .exe zu compilen ?
// Updated.
Danke Christoph54!
Bitte merk dir eins: Wenn du dich beim Programmieren dabei erwischst dass du ein und Dinge wiederholst/kopierst - dann machst du etwas falsch.
Wenn du deine "Datenbanken" so abänderst:
[...]
määäh ..
soweit bin ich nochnicht ..
Bitte noch Global verwenden bei der Deklaration. Die Klammern bei $NpcS = ("") kannst du auch weglassen, macht man nicht.
Ansonsten...Gut.
Achja. Es heißt das Script.
Done.
Warum eig Global ?
macht ja jetzt in diesem fall kein unterschied