ohhh man
das ist so sinnlos
ohh man
danke
ich wehre wahrscheinlich gar nicht drauf gekommen
danke
ohhh man
das ist so sinnlos
ohh man
danke
ich wehre wahrscheinlich gar nicht drauf gekommen
danke
das kann zwar nicht ausführen aber so siehts aus
zwischen drin ist nicht was die variable $input andres benennt
$input = GUICtrlCreateInput("http://www.google.de", 182, 32, 393, 24)
$url = GUICtrlRead ($input)
MsgBox (0,"",$input)
hey,
GUICtrlRead liest bei immer immer blos 3 aus.
obwohl was anderes drinne steht.
Gruß Nitrama
okay hab was gefunden^^
FileInstall war die lösung^^
danke
hey,
kann man ein Bild direkt einfügen so das dass beim compilieren im Skript drinnen ist?
also ohne GUICtrlCreatePic .
Gruß Nitrama
Hey,
ich habe ma ne gui uns so gemacht und man kann jetzt zwischen Zitaten und Witzen auswählen.
habs auch noch ma im anhang
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#Include <File.au3>
#include <Misc.au3>
$z = 0
$w = 0
$line = "linke Maus drücken drücken Bitte"
HotKeySet("{ESC}", "_Quit")
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 401, 401, 280, 138)
$Label1 = GUICtrlCreateLabel("Zitat Manager", 116, 24, 168, 36)
GUICtrlSetFont(-1, 20, 400, 0, "MS Sans Serif")
$Neues_Zitat = GUICtrlCreateInput("Neues Zitat", 142, 120, 121, 21)
$Button1 = GUICtrlCreateButton("Hinzufügen", 275, 118, 75, 25)
$Checkbox1 = GUICtrlCreateCheckbox("Zitate", 104, 264, 57, 17, BitOR($GUI_SS_DEFAULT_CHECKBOX,$BS_LEFT))
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
$Checkbox2 = GUICtrlCreateCheckbox("Witze", 248, 264, 65, 17, BitOR($GUI_SS_DEFAULT_CHECKBOX,$BS_LEFT))
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
$Button2 = GUICtrlCreateButton("Hinzufügen", 275, 171, 75, 25)
$Button3 = GUICtrlCreateButton("Los Gehts !", 163, 328, 75, 25)
$Neuer_Witz = GUICtrlCreateInput("Neuer Witz", 142, 173, 121, 21)
$Radio1 = GUICtrlCreateRadio("MsgBox", 112, 304, 65, 17)
$Radio2 = GUICtrlCreateRadio("Tooltip", 224, 304, 65, 17)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
$Label2 = GUICtrlCreateLabel("und / oder", 167, 264, 64, 20)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
$Label3 = GUICtrlCreateLabel("oder", 184, 303, 32, 20)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
_zit_hinzufuegen ()
Case $Button2
_witz_hinzufuegen ()
Case $Button3
_test ()
EndSwitch
WEnd
Func _test ()
$w = 0
$z = 0
$Checkbox11 = GUICtrlRead($Checkbox1)
$Checkbox22 = GUICtrlRead($Checkbox2)
$Radio11 = GUICtrlRead($Radio1)
$Radio22 = GUICtrlRead($Radio2)
If $Checkbox11 = $GUI_CHECKED And $Checkbox22 = $GUI_CHECKED Then
$z = 1
$w = 1
If $Radio11 = $GUI_CHECKED Then
_MSgbox ()
ElseIf $Radio22 = $GUI_CHECKED Then
_Tooltip ()
Else
MsgBox (4096, "nichts angewählt", "Bitte wählen sie was sie ob sie in MsgBox oder ToolTip lesen möchten")
EndIf
ElseIf $Checkbox11 = $GUI_CHECKED Then
$z = 1
If $Radio11 = $GUI_CHECKED Then
_MSgbox ()
ElseIf $Radio22 = $GUI_CHECKED Then
_Tooltip ()
Else
MsgBox (4096, "nichts angewählt", "Bitte wählen sie was sie ob sie in MsgBox oder ToolTip lesen möchten")
EndIf
ElseIf $Checkbox22 = $GUI_CHECKED Then
$w = 1
If $Radio11 = $GUI_CHECKED Then
_MSgbox ()
ElseIf $Radio22 = $GUI_CHECKED Then
_Tooltip ()
Else
MsgBox (4096, "nichts angewählt", "Bitte wählen sie was sie ob sie in MsgBox oder ToolTip lesen möchten")
EndIf
Else
MsgBox (4096, "nichts angewählt", "Bitte wählen sie was sie ob sie Zitate und/oder Witze lesen möchten")
EndIf
EndFunc
Func _Tooltip () ; skript by Nitrama
GUIDelete ($Form1)
$dll = DllOpen("user32.dll")
While 1
Sleep (10)
If _IsPressed("01", $dll) Then
_neu ()
EndIf
$pos = MouseGetPos()
$pos[0] += 10
$pos[1] += 10
ToolTip($line, $pos[0] , $pos[1])
WEnd
EndFunc
Func _zit_hinzufuegen ()
$zit = GUICtrlRead($Neues_Zitat)
$file1 = FileOpen ("zitate.zit",1)
$iLine = _FileCountLines("zitate.zit")
_FileWriteToLine("zitate.zit", $iLine, $zit )
FileClose ($file1)
EndFunc
Func _witz_hinzufuegen ()
$zit = GUICtrlRead($Neues_Zitat)
$file2 = FileOpen ("witze.zit",1)
$iLine = _FileCountLines("witze.zit")
_FileWriteToLine("witze.zit", $iLine, $zit )
FileClose ($file2)
EndFunc
Func _MSgbox (); -skript by campweb "für skript angepasst"
GUIDelete ($Form1)
$file1 = FileOpen ("zitate.zit" , 0)
$file2 = FileOpen ("witze.zit" , 0)
$zeilen1 = _FileCountLines("zitate.zit")
$zeilen1 += 10
$zeilen2 = _FileCountLines("witze.zit")
$zeilen2 += 10
MsgBox(4096, "Zitat! by campweb", "Willkommen bei Zitat!"&@crlf&@crlf&"Klicken Sie einfach auf OK, um das nächste Zitat zu lesen. Wenn das Programm meint es reicht für heute, wird es beendet."&@crlf&"Viel Spaß!")
While 1
if $w == 1 and $z == 1 then
$filenumber = Random (1, 2 ,1)
If $filenumber == 1 Then
$rnd = Random(1, $zeilen1, 1)
$line = FileReadLine($file1, $rnd)
If @error = -1 Then Exit
MsgBox(64, "Zitat! by campweb", $line)
Else
$rnd = Random(1, $zeilen2, 1)
$line = FileReadLine($file2, $rnd)
If @error = -1 Then Exit
MsgBox(4096, "Witze! by ...", $line)
EndIf
ElseIf $w == 1 Then
$rnd = Random(1, $zeilen2, 1)
$line = FileReadLine($file2, $rnd)
If @error = -1 Then Exit
MsgBox(64, "Witze! by ...", $line)
ElseIf $z == 1 Then
$rnd = Random(1, $zeilen1, 1)
$line = FileReadLine($file1, $rnd)
If @error = -1 Then Exit
MsgBox(64, "Zitat! by campweb", $line)
EndIf
Wend
EndFunc
Func _Quit()
Exit
EndFunc
Func _neu ()
$file1 = FileOpen ("zitate.zit" , 0)
$file2 = FileOpen ("witze.zit" , 0)
$zeilen1 = _FileCountLines("zitate.zit")
$zeilen2 = _FileCountLines("witze.zit")
if $w == 1 and $z == 1 then
$filenumber = Random (1, 2 ,1)
If $filenumber == 1 Then
$rnd = Random(1, $zeilen1, 1)
$line = FileReadLine($file1, $rnd)
Else
$rnd = Random(1, $zeilen2, 1)
$line = FileReadLine($file2, $rnd)
EndIf
ElseIf $w == 1 Then
$rnd = Random(1, $zeilen2, 1)
$line = FileReadLine($file2, $rnd)
ElseIf $z == 1 Then
$rnd = Random(1, $zeilen1, 1)
$line = FileReadLine($file1, $rnd)
EndIf
EndFunc
Gruß Nitrama
PS: ich weiß das mein code ein bisschen unübersichtlich ist
PSS: schönes Wochenende noch
ich habe da ma was gemacht
vllt gefällt euch
#Include <File.au3>
#include <Misc.au3>
$dll = DllOpen("user32.dll")
$file = FileOpen("zitate.zit", 0)
$zeilen =_FileCountLines("zitate.zit")
$rnd = Random(1, $zeilen, 1)
$line = FileReadLine($file, $rnd)
HotKeySet("{ESC}", "_Quit")
While 1
Sleep (10)
If _IsPressed("01", $dll) Then
_neu ()
EndIf
$pos = MouseGetPos()
$pos[0] += 10
$pos[1] += 10
ToolTip($line, $pos[0] , $pos[1])
WEnd
Func _Quit()
FileClose ($file)
DllClose($dll)
Exit
EndFunc
[/autoit] [autoit][/autoit] [autoit]Func _neu ()
$rnd = Random(1, $zeilen, 1)
$line = FileReadLine($file, $rnd)
EndFunc
hey,
ich wollte mir ma ein auto "rennen" oder sowas basteln.
ich wollte das wenn mein auto (ein @) an den Rand fährt (eine #) dann soll es nicht mehr weiter gehen.
$1 = -1
$2 = 50
$1lvl = FileOpen ("1.txt",0)
$strecke = FileRead ("1.txt")
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 300, 450, -1, -1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
HotKeySet ("{left}", "links")
HotKeySet ("{right}", "rechts")
While 1
$label1 = GUICtrlCreateLabel ("@",$2,10)
$label = GUICtrlCreateLabel ($strecke,10,$1)
Sleep (100)
GUICtrlDelete ($label)
GUICtrlDelete ($label1)
$1 -= 5
WEnd
Func links()
$2 -= 5
EndFunc
Func rechts ()
$2 += 5
EndFunc
eine txt muss auch mit dabei sein
die muss "1.txt" heißen
# #
# #
# #
# #
# #
# #
# #
# #
# #
# #
# #
_____ZIEL_____
hab grade mit bekommen das die # nicht auseinander bleiben wollen
und wenn es im ziel is soll z.B; eine MsgBox kommen
Danke für die hilfe
Gruß Nitrama
cool
kannste ja jetzt noch machen das wenn man es unter ranzieht
musst du ja ne machen
okay danke
hey,
wie kann man ein bild als button nehmen?
Gruß Nitrama
ist echt cool
kannste ja vielleicht noch machen das man es an eine Seite schiebt und das das dann die Hälfte des Bildschirm einnimmt
ich find den auch gut
und ist auch noch sehr ausbaufähig
hey
neu version ist drausen
version 1.2
neu: man kann mit enter bestätigen und übersichtlicher
Tipps und Verbesserungsvorschläge an mich oder hier rein
Gruß Nitrama
version 1.1 ist online
vllt noch ein paar tipps oder verbesserungsvorschläge
Hey ,
ich hab hier noch ein zahlen rate spiel .
hab ich ma vor einiger zeit gemacht.
Hier version 1.0
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <EditConstants.au3>
$Form = GUICreate('zahlen raten',220,210,-1,-1)
$input = guictrlcreateinput('zahl', 55, 87, 107, 19 , $ES_NUMBER)
$button = guictrlcreatebutton('raten', 60, 140, 100, 30)
$button2 = guictrlcreatebutton('neu', 60, 170, 100, 30)
$label = GUICtrlCreateLabel ("Errate die Zahl" ,75,20)
$label1 = GUICtrlCreateLabel ("zwischen 0 und 1000" ,60,60)
GUISetState(@SW_SHOW, $Form)
$zuege = 0
$secret = Random (0 , 1000 , 1)
$von=0
$bis=0
$blub = 0
While 1
If $blub == 1 Then
GUICtrlDelete ($label1)
$label1 = GUICtrlCreateLabel ("zwischen " & $von & " und " & $bis,60,60)
$blub = 0
EndIf
$msg = GUIGetMsg($Form)
Select
Case $msg=$GUI_EVENT_CLOSE
exit
Case $msg=$button
$zuege += 1
$zahl = GUICtrlRead($input)
If $secret == $zahl Then
MsgBox ( 4096 ,"gewonnen!!!" , "gewonnen!!!" & @CRLF & "du hast " & $zuege & " züge gebraucht" )
ElseIf $secret < $zahl then
MsgBox ( 4096 ,"zu groß" , "zu groß!!!" )
ElseIf $secret > $zahl then
MsgBox ( 4096 ,"zu klein" , "zu klein!!!" )
EndIf
Case $msg=$button2
$secret = Random ($von , $bis , 1)
$zuege = 0
$Form1 = GUICreate('zahlen raten',220,210,-1,-1)
$input1 = guictrlcreateinput('von', 30, 50, 60, 20 ,$ES_NUMBER)
$input2 = guictrlcreateinput('bis', 130, 50, 60, 20 , $ES_NUMBER)
$button3 = guictrlcreatebutton('neu', 60, 145, 94, 26)
GUISetState(@SW_SHOW, $Form1)
$blub = 0
While 2
$msg1 = GUIGetMsg($Form1)
Select
Case $msg1=$GUI_EVENT_CLOSE
exit
Case $msg1=$button3
$von = GUICtrlRead($input1)
$bis = GUICtrlRead($input2)
If $von < $bis Then
$secret = Random ($von , $bis , 1)
$zuege = 0
GUIDelete ($Form1)
$blub = 1
exitloop
ElseIf $von == $bis Then
MsgBox (4096 , "Warnung" , "die zahlen müssen underschiedlich sein")
ElseIf $von > $bis Then
MsgBox (4096 , "Warnung" , "die erste zahl muss kleiner als die zweite sein")
EndIf
Endselect
WEnd
Endselect
WEnd
Neue version 1.1
neu: mindestens 100 zahlen unterschied
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <EditConstants.au3>
$Form = GUICreate('zahlen raten',220,210,-1,-1)
$input = guictrlcreateinput('zahl', 55, 87, 107, 19 , $ES_NUMBER)
$button = guictrlcreatebutton('raten', 60, 140, 100, 30)
$button2 = guictrlcreatebutton('neu', 60, 170, 100, 30)
$label = GUICtrlCreateLabel ("Errate die Zahl" ,75,20)
$label1 = GUICtrlCreateLabel ("zwischen 0 und 1000" ,60,60)
GUISetState(@SW_SHOW, $Form)
$zuege = 0
$secret = Random (0 , 1000 , 1)
$von=0
$bis=0
$blub = 0
While 1
If $blub == 1 Then
GUICtrlDelete ($label1)
$label1 = GUICtrlCreateLabel ("zwischen " & $von & " und " & $bis,60,60)
$blub = 0
EndIf
$msg = GUIGetMsg($Form)
Select
Case $msg=$GUI_EVENT_CLOSE
exit
Case $msg=$button
$zuege += 1
$zahl = GUICtrlRead($input)
If $secret == $zahl Then
MsgBox ( 4096 ,"gewonnen!!!" , "gewonnen!!!" & @CRLF & "du hast " & $zuege & " züge gebraucht" )
ElseIf $secret < $zahl then
MsgBox ( 4096 ,"zu groß" , "zu groß!!!" )
ElseIf $secret > $zahl then
MsgBox ( 4096 ,"zu klein" , "zu klein!!!" )
EndIf
Case $msg=$button2
$secret = Random ($von , $bis , 1)
$zuege = 0
$Form1 = GUICreate('zahlen raten',220,210,-1,-1)
$input1 = guictrlcreateinput('von', 30, 50, 60, 20 ,$ES_NUMBER)
$input2 = guictrlcreateinput('bis', 130, 50, 60, 20 , $ES_NUMBER)
$button3 = guictrlcreatebutton('neu', 60, 145, 94, 26)
GUISetState(@SW_SHOW, $Form1)
$blub = 0
While 2
$msg1 = GUIGetMsg($Form1)
Select
Case $msg1=$GUI_EVENT_CLOSE
exit
Case $msg1=$button3
$von = GUICtrlRead($input1)
$bis = GUICtrlRead($input2)
$bis -= $von
If $bis <= 100 Then
MsgBox (4096 , "Warnung" , "müssen mehr als 100 Zahlen unterschied sein" & @CRLF & "oder sie müssen die zahlen vertauschen")
$von = GUICtrlRead($input1)
$bis = GUICtrlRead($input2)
Elseif $von < $bis Then
$von = GUICtrlRead($input1)
$bis = GUICtrlRead($input2)
$secret = Random ($von , $bis , 1)
$zuege = 0
GUIDelete ($Form1)
$blub = 1
exitloop
EndIf
Endselect
WEnd
Endselect
WEnd
neu version 1.2
autoit.de/wcf/attachment/11710/
neu; mit enter bestätigern ist jetzt möglich und ein bischen überlichtilicher
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <EditConstants.au3>
HotKeySet ("{ENTER}", "auswerten")
$Form = GUICreate('zahlen raten',220,250,-1,-1)
$input = guictrlcreateinput('zahl', 55, 100, 107, 19 , $ES_NUMBER)
$button = guictrlcreatebutton('raten', 60, 140, 100, 30)
$button2 = guictrlcreatebutton('neu', 60, 170, 100, 30)
$label = GUICtrlCreateLabel ("Errate die Zahl" ,75,20)
$label1 = GUICtrlCreateLabel ("zwischen 0 und 1000" ,60,40)
$label2 = GUICtrlCreateLabel ("" ,60,60)
GUISetState(@SW_SHOW, $Form)
$schonmall = -1
$zahl = -2
$zuege = 0
$secret = Random (0 , 1000 , 1)
$von=0
$bis=0
$blub = 0
While 1
If $blub == 1 Then
GUICtrlDelete ($label1)
$label1 = GUICtrlCreateLabel ("zwischen " & $von & " und " & $bis,60,40)
$blub = 0
EndIf
$msg = GUIGetMsg($Form)
Select
Case $msg=$GUI_EVENT_CLOSE
exit
Case $msg=$button
auswerten ()
Case $msg=$button2
neu()
Endselect
WEnd
Func neu ()
$secret = Random ($von , $bis , 1)
$zuege = 0
$Form1 = GUICreate('zahlen raten',220,210,-1,-1)
$input1 = guictrlcreateinput('von', 30, 50, 60, 20 ,$ES_NUMBER)
$input2 = guictrlcreateinput('bis', 130, 50, 60, 20 , $ES_NUMBER)
$button3 = guictrlcreatebutton('neu', 60, 145, 94, 26)
GUISetState(@SW_SHOW, $Form1)
$blub = 0
While 2
$msg1 = GUIGetMsg($Form1)
Select
Case $msg1=$GUI_EVENT_CLOSE
exit
Case $msg1=$button3
$von = GUICtrlRead($input1)
$bis = GUICtrlRead($input2)
$bis -= $von
If $bis <= 99 Then
MsgBox (4096 , "Warnung" , "müssen mehr als 100 Zahlen unterschied sein" & @CRLF & "oder sie müssen die zahlen vertauschen")
$von = GUICtrlRead($input1)
$bis = GUICtrlRead($input2)
Elseif $von < $bis Then
$von = GUICtrlRead($input1)
$bis = GUICtrlRead($input2)
$secret = Random ($von , $bis , 1)
$zuege = 0
GUIDelete ($Form1)
$blub = 1
exitloop
EndIf
Endselect
WEnd
EndFunc
Func auswerten ()
$zahl = GUICtrlRead($input)
If $zahl == $schonmall Then
MsgBox ( 4096 ,"schonmall" , "du hast die "& $zahl & " das letzte mal schon eingegeben" )
Else
If $secret == $zahl Then
$zuege += 1
MsgBox ( 4096 ,"gewonnen!!!" , "gewonnen!!!" & @CRLF & "du hast " & $zuege & " züge gebraucht" )
ElseIf $secret < $zahl then
$zuege += 1
GUICtrlDelete ($label2)
$label2 = GUICtrlCreateLabel ("zu groß" ,80,60,100)
GUICtrlSetFont(-1, 16, 400, 0, "MS Sans Serif")
$schonmall = $zahl
ElseIf $secret > $zahl then
$zuege += 1
GUICtrlDelete ($label2)
$label2 = GUICtrlCreateLabel ("zu klein" ,80,60,100)
GUICtrlSetFont(-1, 16, 400, 0, "MS Sans Serif")
$schonmall = $zahl
EndIf
EndIf
EndFunc
vllt hab ihr ja noch ein paar tipps für mich
Gruß Nitrama
Moin,
ich hab mir ma nen kleinen Musik player gebastelt.
is zwar nicht viel aber ein bischen kann er schon^^.
vielleicht hab ihr ja noch ein paar Tipps oder Verbesserungsvorschläge.
source und exe ist im anhang dabei.
Gruß Nitrama