wenn das Fenster einen Text hat, der immer gleich ist
und möglichst einmalig, dann könnte es so funktionieren:
$titel_des_fensters = WinGetTitle("","Text der in dem Fenster vorkommt... sollte eindeutig sein")
[/autoit]wenn das Fenster einen Text hat, der immer gleich ist
und möglichst einmalig, dann könnte es so funktionieren:
$titel_des_fensters = WinGetTitle("","Text der in dem Fenster vorkommt... sollte eindeutig sein")
[/autoit]Hallo zawn,
du musst nur die Variable $open Global definieren, dann steht Ihr Inhalt (in dem Fall der ausgewählte Pfad auch zur Verfügung...
#include <GuiConstantsEx.au3>
#include <AVIConstants.au3>
#include <TreeViewConstants.au3>
#include <WindowsConstants.au3>
Opt("GUIOnEventMode", 1)
;Gui Create
GuiCreate("HPGL-Print", 500, 100)
GuiSetIcon(@SystemDir & "\rtcshare.exe", 0)
GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEClicked")
[/autoit] [autoit][/autoit] [autoit];Label
GuiCtrlCreateLabel("Bitte den Pfad zur zu druckenden hpgl-Datei angeben:", 10, 20, 400, 20)
;Textbox
$input = GUICtrlCreateInput("", 10, 35, 400, 20)
Global $open
;Durchsuchenbutton
$Button_D = GUICtrlCreateButton("Durchsuchen", 415, 35, 80, 20)
GUICtrlSetonEvent($Button_D, "Durchsuchenbutton")
;Druckenbutton
$Button_P = GUICtrlCreateButton("Drucken", 200, 70, 80, 20)
GUICtrlSetonEvent($Button_P, "Druckenbutton")
GUISetState(@SW_SHOW)
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]Func Durchsuchenbutton()
$open = FileOpenDialog("HPGL-Datei auswählen...", @DesktopDir, "HPGL (*.*)")
GUICtrlSetData($input, $open)
EndFunc
$path = GUICtrlRead($input)
[/autoit] [autoit][/autoit] [autoit]Func Druckenbutton()
Run(@COMSPEC & ' /c copy '&'"'&$open&'"'&' lpt2')
EndFunc
Func CLOSEClicked()
Exit
EndFunc
;Gui End
[/autoit] [autoit][/autoit] [autoit]While GuiGetMsg() <> $GUI_EVENT_CLOSE
WEnd
nachdem in Deiner Version der Exit Button bei laufendem ping nicht abgefragt wird,
hab ich mal versucht gleich beide Probleme zu lösen.
Du kannst die AdlibEnable/AdlibDisable Funktion auch für andere Funktionsaufrufe verwenden.
Halt immer nur einen zur gleichen Zeit...
; AutoIt Version: 3.3.0.0
[/autoit] [autoit][/autoit] [autoit]Opt("WinWaitDelay", 500)
Opt("TrayIconHide", 0) ;0=show, 1=hide tray icon
Opt("MouseCoordMode", 0) ;1=absolute, 0=relative, 2=client
Opt("ExpandEnvStrings", 1) ;0=don't expand, 1=do expand
Opt("ExpandVarStrings", 1) ;0=don't expand, 1=do expand
Opt("WinDetectHiddenText", 0) ;0=don't detect, 1=do detect
Opt("WinTitleMatchMode", 1) ;1=start, 2=subStr, 3=exact, 4=advanced
Opt("WinTextMatchMode", 1) ;1=complete, 2=quick
#include <Process.au3>
#include <File.au3>
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
$orange = "0xFF6600"
$green = "0x66FF33"
$yellow = "0xFFFF00"
$kin = "0xFF9966"
$turquoise = "0x00CCCC"
$magenta = "0xCC6699"
$lgreen = "0xCCFFCC"
$Form1 = GUICreate("CMD - GUI", 736, 748, 52, 44)
$Group1 = GUICtrlCreateGroup("", 16, 8, 697, 57)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group2 = GUICtrlCreateGroup("cmd", 16, 72, 337, 129)
$Label1 = GUICtrlCreateLabel("File", 32, 96, 60, 17)
$Input1 = GUICtrlCreateInput("", 104, 93, 233, 21)
GUICtrlSetData($Input1, "ping.exe")
$Label2 = GUICtrlCreateLabel("Count", 32, 136, 60, 17)
$Input2 = GUICtrlCreateInput("", 104, 133, 233, 21)
GUICtrlSetData($Input2, "19")
$Label3 = GUICtrlCreateLabel("Address", 32, 176, 60, 17)
$Input3 = GUICtrlCreateInput("", 104, 173, 233, 21)
GUICtrlSetData($Input3, "127.0.0.1")
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group3 = GUICtrlCreateGroup("", 376, 72, 337, 129)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group4 = GUICtrlCreateGroup("", 16, 320, 697, 369)
$Button1 = GUICtrlCreateButton("START", 40, 704, 75, 25)
$Button2 = GUICtrlCreateButton("EXIT", 608, 704, 75, 25)
$Edit1 = GUICtrlCreateEdit("", 40, 344, 649, 329)
GUICtrlSetData(-1, "")
GuiCtrlSetBkColor(-1, $lgreen)
;GUICtrlSetState($Edit1, $GUI_DISABLE)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group5 = GUICtrlCreateGroup("", 16, 208, 697, 105)
$Label4 = GUICtrlCreateLabel("Command", 32, 232, 100, 17)
$Input4 = GUICtrlCreateInput("", 144, 229, 553, 21)
$Label5 = GUICtrlCreateLabel("", 32, 272, 100, 17)
$Input5 = GUICtrlCreateInput("", 144, 269, 553, 21)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$show = GUISetState(@SW_SHOW) ; startet die GUI
Local $batch, $command,$winTitle
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $Button1
GuiCtrlSetBkColor($Button1, $orange)
$command = GUICtrlRead($Input1) & " -n " & GUICtrlRead($Input2) & " " & GUICtrlRead($Input3)
GUICtrlSetData($Input4, $command)
Local $text = '', $textalt = ''
Local $Pid = Run(@ComSpec & ' /c ' & $command, '', @SW_HIDE, 2 + 4)
AdlibEnable("pingen",20)
Case $GUI_EVENT_CLOSE
Exit
Case $Button2
Exit
EndSwitch
WEnd
Func pingen()
$text &= StdoutRead($Pid)
If @error Then
AdlibDisable()
GuiCtrlSetBkColor($Button1, $green)
Return
EndIf
If $textalt <> $text Then
GUICtrlSetData($Edit1,$text)
GUICtrlSetState($Edit1,$GUI_FOCUS)
ControlSend("CMD - GUI","",$Edit1,"{PGDN}",0)
$textalt = $text
EndIf
EndFunc
Edit: Schreibfehler korrigiert
ich glaube, ich habe verstanden
mach mal statt:
_FileReadToArray("db.cvs", $table)
If IsArray($table) Then
das hier:
If _FileReadToArray("db.cvs", $table) Then
[/autoit]Hallo diepfeile,
ich hab mir mal zum eigenen Verständnis ein Script gemacht.
#include<Array.au3>
Dim $array1[3] = ["1","2","3"]
Dim $array2[2] = ["1","2"]
Dim $table[2] = [$array1,$array2]
If IsArray($table) Then
MsgBox(0, '', "table ist ein Array")
If IsArray($table[0]) Then
$var = $table[0]; wenn ein Array($array1) in einem Array($table) an eine Variable($var) übergeben wird, dann wird diese Variable zum Array!
_ArrayDisplay($var)
EndIf
EndIf
Dim $array1[3] = ["1","2","3"]
Dim $array2 = "2"
Dim $table[2] = [$array1,$array2]
If IsArray($table) Then
MsgBox(0, '', "table ist ein Array")
If IsArray($table[1]) Then
$var = $table[1]
_ArrayDisplay($var)
Else
MsgBox(0, '', "$array2 ist kein Array")
EndIf
EndIf
einzig, was $xyid[1] bedeutet verstehe ich noch nicht ...
So funktioniert doch alles...
PS:
$var = $var1[$xyid[0]] --> in $var1 ist doch gar kein Array mehr, daher kannst Du dieses auch nicht als solches referenziert übergeben...
Hallo Deepred,
ich versuche mich mal an Deinen Fragen.
zu 1)
Zitatich wollte mal fragen ob man seine Programme (Exe), die mit AutoIt geschrieben sind immer mit dem Obfuscator verschleiern muss.
Es liegt sicherlich am Autor einer Werkes (Software) welche Form von Schutz er anwendet.
Wenn Du Deine Software schützen möchtest vor Mißbrauch, ist der Obfuscator sicher schon mal ein guter Anfang.
Ansonsten bleibt Dir nur, bei Feststellung nur noch rechtliche Schritte. Die mit Beweislast und, und, und,
nicht so einfach durchzusetzen sind. Besonders im privaten Bereich sicher nicht bezahlbar.
zu2)
ZitatBzw. welche Konsequenzen gibt es wenn jemand ein Script decompiled, obwohl es verboten ist?
Das hängt wohl von dem ab, dem das Script / Software gehört / geschrieben hat.
Bei professioneller Software kann das ziemlich teuer werden.
(In's Gefägnis kommt man dafür aber wohl nicht, solange dies nicht räuberische/kriminelle Ausmaße annimmt)
Im privaten Bereich gilt wie im richtigen Leben: "Wo kein Kläger, da kein Richter".
Es entspricht aber weder guter Kinderstube, noch ist es erlaubt eine Datei zu decompilieren. --> Link zum UrhG69a
Einzige Möglichkeit legal an den Source Code zu kommen ist, wenn der Autor diesen veröffentlicht.
zu3)
ZitatWie kann man die Exe Dateien vor dem Decompilen schützen?
auf die Gefahr hin, dass ich mich jetzt weit aus dem Fenster lehne: Gar nicht.
Ich hoffe, meine Ausführungen helfen Dir weiter...
Hallo nuts,
bitte poste doch mal Dein Script,
damit man sich da was drunter vorstellen kann.
Hallo Commander21,
ich habe mal Deine UDF etwas modifiziert,
damit Opt("GUIOnEventMode", $iOnEventMode)
überhaupt am Ende ausgeführt wird.
; ======================================================
;
; Name: _MsgBox
; Funktion: Eine einfach MsgBox, bei der man Position und Farbe ändern kann.
;
; Parameter: $Flag: Das Flag gibt an, wie die Box aussieht, und welche Buttons angezeigt werden.
; $ExFlag: Bestimmt, welches Icon angezeigt werden soll.
; $Titel: Titel der MsgBox.
; $Text: Text, der in der MsgBox stehen soll.
; $Left: X-Position der MsgBox.
; $Top: Y-Position der MsgBox.
; $Color: Hintergrundfarbe der MsgBox
;
; ======================================================
Func _MsgBox ($Flag, $ExFlag, $Titel, $Text, $Left, $Top, $Color)
Local $iOnEventMode = Opt("GUIOnEventMode", 0)
Local $Size = 7
Local $FontWidth = 50
Local $return
$MsgGUI = GUICreate ($Titel, 245, 200, $Left, $Top)
GUISetBkColor ($Color)
GUISetIcon ("User32.dll", -1)
GUISetState (@SW_SHOW, $MsgGUI)
$MsgText = GUICtrlCreateLabel ($Text, 60, 10, 180, 160, 0x0800)
GUICtrlSetBkColor (-1, $Color)
; -------------------------------------
Switch $ExFlag
Case 0
GUICtrlCreateIcon ("User32.dll", -1, 10, 10, 32, 32)
Case 16
GUICtrlCreateIcon ("User32.dll", -4, 10, 10, 32, 32)
Case 32
GUICtrlCreateIcon ("User32.dll", -3, 10, 10, 32, 32)
Case 48
GUICtrlCreateIcon ("User32.dll", -2, 10, 10, 32, 32)
Case 64
GUICtrlCreateIcon ("User32.dll", -5, 10, 10, 32, 32)
EndSwitch
; -------------------------------------
If $Flag = 0 Then
$Button1 = GUICtrlCreateButton ("Ok", 75, 175, 75, 20)
GUICtrlSetFont (-1, $Size, $FontWidth)
While 1
$Msg1 = GUIGetMsg ()
Switch $msg1
Case $Button1
$return = 1
ExitLoop
Case -3
$return = 2
ExitLoop
EndSwitch
WEnd
EndIf
; -------------------------------------
If $Flag = 1 Then
$Button2 = GUICtrlCreateButton ("Ok", 25, 175, 75, 20)
GUICtrlSetFont (-1, $Size, $FontWidth)
$Button3 = GUICtrlCreateButton ("Abbrechen", 125, 175, 75, 20)
GUICtrlSetFont (-1, $Size, $FontWidth)
While 1
$Msg2 = GUIGetMsg ()
Switch $msg2
Case $Button2
$return = 1
ExitLoop
Case $Button3
$return = 2
ExitLoop
Case -3
$return = 2
ExitLoop
EndSwitch
WEnd
EndIf
; -------------------------------------
If $Flag = 2 Then
$Button4 = GUICtrlCreateButton ("Abbrechen", 5, 175, 75, 20)
GUICtrlSetFont (-1, $Size, $FontWidth)
$Button5 = GUICtrlCreateButton ("Wiederhohlen", 85, 175, 75, 20)
GUICtrlSetFont (-1, $Size, $FontWidth)
$Button6 = GUICtrlCreateButton ("Ignorieren", 165, 175, 75, 20)
GUICtrlSetFont (-1, $Size, $FontWidth)
While 1
$Msg3 = GUIGetMsg ()
Switch $msg3
Case $Button4
$return = 2
ExitLoop
Case $Button5
$return = 4
ExitLoop
Case $Button6
$return = 5
ExitLoop
Case -3
$return = 2
ExitLoop
EndSwitch
WEnd
EndIf
; -------------------------------------
If $Flag = 3 Then
$Button7 = GUICtrlCreateButton ("Ja", 5, 175, 75, 20)
GUICtrlSetFont (-1, $Size, $FontWidth)
$Button8 = GUICtrlCreateButton ("Nein", 85, 175, 75, 20)
GUICtrlSetFont (-1, $Size, $FontWidth)
$Button9 = GUICtrlCreateButton ("Abbrechen", 165, 175, 75, 20)
GUICtrlSetFont (-1, $Size, $FontWidth)
While 1
$Msg4 = GUIGetMsg ()
Switch $msg4
Case $Button7
$return = 6
ExitLoop
Case $Button8
$return = 7
ExitLoop
Case $Button9
$return = 2
ExitLoop
Case -3
$return = 2
ExitLoop
EndSwitch
WEnd
EndIf
; -------------------------------------
If $Flag = 4 Then
$Button10 = GUICtrlCreateButton ("Ja", 25, 175, 75, 20)
GUICtrlSetFont (-1, $Size, $FontWidth)
$Button11 = GUICtrlCreateButton ("Nein", 125, 175, 75, 20)
GUICtrlSetFont (-1, $Size, $FontWidth)
While 1
$Msg4 = GUIGetMsg ()
Switch $msg4
Case $Button10
$return = 6
ExitLoop
Case $Button11
$return = 7
ExitLoop
Case -3
$return = 2
ExitLoop
EndSwitch
WEnd
EndIf
; -------------------------------------
If $Flag = 5 Then
$Button12 = GUICtrlCreateButton ("Wiederhohlen", 25, 175, 75, 20)
GUICtrlSetFont (-1, $Size, $FontWidth)
$Button13 = GUICtrlCreateButton ("Abbrechen", 125, 175, 75, 20)
GUICtrlSetFont (-1, $Size, $FontWidth)
While 1
$Msg4 = GUIGetMsg ()
Switch $msg4
Case $Button12
$return = 4
ExitLoop
Case $Button13
$return = 2
ExitLoop
Case -3
$return = 2
ExitLoop
EndSwitch
WEnd
EndIf
; -------------------------------------
If $Flag = 6 Then
$Button14 = GUICtrlCreateButton ("Abbrechen", 5, 175, 75, 20)
GUICtrlSetFont (-1, $Size, $FontWidth)
$Button15 = GUICtrlCreateButton ("Wiederhohlen", 85, 175, 75, 20)
GUICtrlSetFont (-1, $Size, $FontWidth)
$Button16 = GUICtrlCreateButton ("Weiter", 165, 175, 75, 20)
GUICtrlSetFont (-1, $Size, $FontWidth)
While 1
$Msg4 = GUIGetMsg ()
Switch $msg4
Case $Button14
$return = 2
ExitLoop
Case $Button15
$return = 4
ExitLoop
Case $Button16
$return = 11
ExitLoop
Case -3
$return = 2
ExitLoop
EndSwitch
WEnd
EndIf ;==> Flags
; ---
GUIDelete($MsgGUI)
Opt("GUIOnEventMode", $iOnEventMode)
Return($return)
EndFunc ;==> _MsgBox
; ---
; ---
; ---
; BEISPIEL ( Um die Udf zu benutzen, entweder ab hier löschen, oder auskommentieren!
_MsgBox (2, 32, "Titel der MsgBox", "Dies ist der Text, der in der MsgBox stehen soll." & @CRLF & @CRLF & "Das steht 2 Zeilen weiter.", 500, 500, 0x00FF00)
schau mal unter BlockInput(1)
ZitatJedoch habe ich zurzeit 2 Probleme.
und wenn Du uns noch sagst, was Deine Probleme sind...
oder dem Label den erweiterten Syle zuweisen:
$B = GUICtrlCreateLabel("", 30, 331, 195, 37,-1,$SS_NOTIFY) ;Soll auf Klick reagieren
[/autoit]Hallo Commander21,
du fragst in Deiner While-Schleife ohne Rücksicht auf Erstellung jeden Button ab.
Erstell Dir doch nur 3 Button und beschrifte / hide was Du nicht brauchst, dann kannst Du diese auch abfragen,
_MsgBox (1, "Titel", "Text", 500, 500, 0x00FF00)
Sleep (2000)
Func _MsgBox ($Flag, $Titel, $Text, $Left, $Top, $Color)
Local $Button1, $Button2, $Button3, $Button4, $Button5, $Button6, $Button7, $Button8, $Button9, $Button10, $Button11, $Button12, $Button13, $Button14, $Button15, $Button16
Local $Size = 7
Local $FontWidth = 50
$MsgGUI = GUICreate ($Titel, 225, 200, $Left, $Top)
GUISetBkColor ($Color)
GUISetState (@SW_SHOW, $MsgGUI)
; ---
If $Flag = 0 Then
$Button1 = GUICtrlCreateButton ("Ok", 75, 175, 75, 20)
GUICtrlSetFont (-1, $Size, $FontWidth)
ElseIf $Flag = 1 Then
$Button2 = GUICtrlCreateButton ("Ok", 25, 175, 75, 20)
GUICtrlSetFont (-1, $Size, $FontWidth)
$Button3 = GUICtrlCreateButton ("Abbrechen", 125, 175, 75, 20)
GUICtrlSetFont (-1, $Size, $FontWidth)
ElseIf $Flag = 2 Then
$Button4 = GUICtrlCreateButton ("Abbrechen", 10, 175, 60, 20)
GUICtrlSetFont (-1, $Size, $FontWidth)
$Button5 = GUICtrlCreateButton ("Wiederhohlen", 80, 175, 60, 20)
GUICtrlSetFont (-1, $Size, $FontWidth)
$Button6 = GUICtrlCreateButton ("Ignorieren", 150, 175, 60, 20)
GUICtrlSetFont (-1, $Size, $FontWidth)
ElseIf $Flag = 3 Then
$Button7 = GUICtrlCreateButton ("Ja", 10, 175, 60, 20)
GUICtrlSetFont (-1, $Size, $FontWidth)
$Button8 = GUICtrlCreateButton ("Nein", 80, 175, 60, 20)
GUICtrlSetFont (-1, $Size, $FontWidth)
$Button9 = GUICtrlCreateButton ("Abbrechen", 150, 175, 60, 20)
GUICtrlSetFont (-1, $Size, $FontWidth)
ElseIf $Flag = 4 Then
$Button10 = GUICtrlCreateButton ("Ja", 25, 175, 75, 20)
GUICtrlSetFont (-1, $Size, $FontWidth)
$Button11 = GUICtrlCreateButton ("Nein", 125, 175, 75, 20)
GUICtrlSetFont (-1, $Size, $FontWidth)
ElseIf $Flag = 5 Then
$Button12 = GUICtrlCreateButton ("Wiederhohlen", 25, 175, 75, 20)
GUICtrlSetFont (-1, $Size, $FontWidth)
$Button13 = GUICtrlCreateButton ("Abbrechen", 125, 175, 75, 20)
GUICtrlSetFont (-1, $Size, $FontWidth)
ElseIf $Flag = 6 Then
$Button14 = GUICtrlCreateButton ("Abbrechen", 10, 175, 60, 20)
GUICtrlSetFont (-1, $Size, $FontWidth)
$Button15 = GUICtrlCreateButton ("Wiederhohlen", 80, 175, 60, 20)
GUICtrlSetFont (-1, $Size, $FontWidth)
$Button16 = GUICtrlCreateButton ("Weiter", 150, 175, 60, 20)
GUICtrlSetFont (-1, $Size, $FontWidth)
EndIf ;==> Flags
$MsgText = GUICtrlCreateEdit ($Text, 10, 10, 205, 160, 0x0800)
; ---
While 1
$msg = GUIGetMsg()
Select
;~ Case $msg = $Button1
;~ Return 1
;~ GUISetState (@SW_HIDE, $MsgGUI)
;~ ExitLoop
Case $msg = $Button2
Return 1
GUISetState (@SW_HIDE, $MsgGUI)
ExitLoop
Case $msg = $Button3
Return 2
GUISetState (@SW_HIDE, $MsgGUI)
ExitLoop
;~ Case $Button4
;~ Return 2
;~ GUISetState (@SW_HIDE, $MsgGUI)
;~ ExitLoop
;~ Case $Button5
;~ Return 4
;~ GUISetState (@SW_HIDE, $MsgGUI)
;~ ExitLoop
;~ Case $Button6
;~ Return 5
;~ GUISetState (@SW_HIDE, $MsgGUI)
;~ ExitLoop
;~ Case $Button7
;~ Return 6
;~ GUISetState (@SW_HIDE, $MsgGUI)
;~ ExitLoop
;~ Case $Button8
;~ Return 7
;~ GUISetState (@SW_HIDE, $MsgGUI)
;~ ExitLoop
;~ Case $Button9
;~ Return 2
;~ GUISetState (@SW_HIDE, $MsgGUI)
;~ ExitLoop
;~ Case $Button10
;~ Return 6
;~ GUISetState (@SW_HIDE, $MsgGUI)
;~ ExitLoop
;~ Case $Button11
;~ Return 7
;~ GUISetState (@SW_HIDE, $MsgGUI)
;~ ExitLoop
;~ Case $Button12
;~ Return 4
;~ GUISetState (@SW_HIDE, $MsgGUI)
;~ ExitLoop
;~ Case $Button13
;~ Return 2
;~ GUISetState (@SW_HIDE, $MsgGUI)
;~ ExitLoop
;~ Case $Button14
;~ Return 2
;~ GUISetState (@SW_HIDE, $MsgGUI)
;~ ExitLoop
;~ Case $Button15
;~ Return 4
;~ GUISetState (@SW_HIDE, $MsgGUI)
;~ ExitLoop
;~ Case $Button16
;~ Return 11
;~ GUISetState (@SW_HIDE, $MsgGUI)
;~ ExitLoop
Case $msg = -3
GUISetState (@SW_HIDE, $MsgGUI)
ExitLoop
EndSelect ;==> MsgBox
Sleep (10)
WEnd
EndFunc ;==> _MsgBox
Oscar ,
ich dachte nur, weil er geschrieben hat:
ZitatNun möchte ich diese Zahlen genau so in ein 2D-Array schreiben. Mein Anfang:
Ansonsten sorry,
will nicht dazwischenfunken ![]()
Hallo jautois,
in der Lösung von Oscar erscheinen aber nur die 9'er in dem Array.
Wenn Du alle Zahlen in Deinem Array haben willst, dann kannst Du das so lösen:
#include <array.au3>
#include<file.au3>
Dim $array[18][24]
Global $zahlencode
_FileReadToArray(@DesktopDir&'\zahlen.txt',$zahlencode); Zahlen von oben mit "Enter"
For $i = 0 To $zahlencode[0]-1
For $t = 0 To 23
$array[$i][$t] = StringMid($zahlencode[$i+1],$t+1,1)
Next
Next
_ArrayDisplay($array)
nachdem ich vorhin etwas "geschlammpt habe
mit den einstelligen Zeiten hier jetzt wenigsten's die AtomUhr...
#include<String.au3>
#include <DATE.au3>
InetGet("http://www.uhrzeit.org/atomuhr.html","Uhrzeit.html",1)
$openfile = FileOpen("Uhrzeit.html",0)
$read_1 = FileRead($openfile)
sleep(4000)
FileClose($openfile)
FileDelete("Uhrzeit.html")
$gettime = _StringBetween($read_1,'<div id="anzeige">','</div>')
;~ GUICtrlSetData($Label1,$gettime[0])
$time = $gettime[0]
[/autoit] [autoit][/autoit] [autoit]$newtime = StringSplit($time,":")
[/autoit] [autoit][/autoit] [autoit];_SetTime($newtime[1],$newtime[2],$newtime[3])
MsgBox(0, '', $newtime[1]&":"&$newtime[2]&":"&$newtime[3])
Exit
[/autoit]Hallo ernergy98,
ich hab da mal was zusammengebaut...
$str = "4/27/2009 8:35 PM"
MsgBox(4160, '', "Datum & Uhrzeit: " & _timeconvert($str))
Func _timeconvert($data)
$a_str = StringSplit($str," ")
$d_str = StringSplit($a_str[1],"/")
$z_str = StringSplit($a_str[2],":")
If $a_str[3] = "PM" Then $z_str[1] += 12
$str = $d_str[2]&"."&$d_str[1]&"."&$d_str[3]&" "&$z_str[1]&":"&$z_str[2]
Return($str)
EndFunc
Kannst das aber auch mit einer externen Software realisieren, falls Du noch mehr Anwendungen mit HotKey starten willst:
Link
sorry, musste halt Dein exit wieder aktivieren ...
hab auch noch ein egekürzte Variante,
den HotKeySet brauchst Du nicht in der Schleife, genauso das FileOpen/Close
hab auch mal die sleep's angepasst.
das AdlibEnable brauchst Du auch nicht ...
#include <GUIConstantsEx.au3>
#include <SliderConstants.au3>
#include <WindowsConstants.au3>
HotKeySet("{F6}", "_Get")
HotKeySet("{ESC}", "_Exit")
Global $Mfile = @ScriptDir & "\Mouseclick.au3", $Pos, $Toogle = 0
FileOpen($Mfile, 1)
; Gui -->
$Options = GUICreate("Options", 400, 190)
GUISetBkColor(0x00E0FFFF) ; will change background color
GUICtrlCreateGroup("Speed", 15, 15, 230, 70)
$label = GUICtrlCreateLabel("Speed = 45", 23, 37)
$slider = GUICtrlCreateSlider(23, 57, 200, 20, BitOR($TBS_AUTOTICKS, $WS_BORDER))
GUICtrlSetState(-1, $Gui_FOCUS)
GUICtrlSetLimit(-1, 100, 0) ; change min/max value
GUICtrlCreateGroup("Key", 15, 100, 230, 70)
GUICtrlCreateLabel("Choose the key which will get pressed.", 23, 122)
$Key = GUICtrlCreateCombo("Left", 23, 140, 75)
GUICtrlSetData(-1, "Right|Middle", "Left") ; add other item snd set a new default
GUICtrlSetData($slider, 10) ; set cursor
GUICtrlCreateGroup("Clicks", 260, 15, 125, 70)
$1Click = GUICtrlCreateRadio("1 Click", 267, 37)
GUICtrlSetState(-1, $GUI_CHECKED)
$2Click = GUICtrlCreateRadio("2 Click's", 267, 57)
$Start = GUICtrlCreateButton("Starten", 262, 105, 123, 65)
GUISetState()
;==>
; Schleife für die Gui
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $Start
$Speed = GUICtrlRead($slider)
$Keys = GUICtrlRead($Key)
$1 = GUICtrlRead($1Click)
$2 = GUICtrlRead($2Click)
GUIDelete()
_getPos()
EndSwitch
sleep(50)
GUICtrlSetData($label, "Speed = " & GUICtrlRead($slider))
WEnd
;==>
; Wartet bis F6 Gedrückt wird und Zeigt einen TrayTip an
Func _getPos()
TrayTip("Press" & " 'ESC' " & "to Exit.", "Press" & " 'F6' " & "to get the coordinates", 500)
EndFunc
;==>_getPos
; Checkt alle Daten und schreibt sie in die Datei
Func _Get()
$Pos = MouseGetPos()
If $1 = $GUI_CHECKED Then
$clicks = 1
ElseIf $2 = $GUI_CHECKED Then
$clicks = 2
EndIf
FileWrite($MFile, "MouseClick('" & $Keys & "', " & $Pos[0] & ", " & $Pos[1] & ", " & $clicks & ", " & $Speed & ")" & @CRLF)
EndFunc
;==>_Get
; Beendet das Script
Func _Exit()
FileClose($MFile)
Exit
EndFunc
;==>_Exit
einen echten Schutz bieten nur Hardware-Dongle oder
(nicht ganz ernst gemeint)
Fingerabdruck Sensoren oder ein genetischer Fingerabdruck, wenn es denn an eine Person gebunden sein soll.
Du kannst auch noch versuchen mit einer Web-Cam einen Irisscan zu machen.
Nein jetzt aber mal im Ernst:
Also ich kenne noch eine Möglichkeit von SwishMax (Flash-Software)
Die machen das so: Man installiert das Programm.
Beim ersten Aufruf muß man einen Code, den das Programm aus gerätespezifischen Parametern generiert,
im Internet in eine Box kopieren zusammen mit der registrierten Email-Adresse.
Dieses php-Script generiert einen Schlüssel, den man per Email erhält. Diesen kopiert man in des Programm und die Software ist freigeschaltet.
Damit ist die Software zwar nicht an die Person gebunden aber wenigstens an die Machine.
Vielleicht hilft's...