Kein Ding passiert ![]()
Beiträge von hellboy3
-
-
[autoit]
; V2.0 ==> 17.03.2009, added intall-option for MozRepl by Stilgar (Thorsten Willert)
[/autoit]
-
Thread ist zwar schon älter aber ich poste trotzdem mal was:
Spoiler anzeigen
[autoit]msgbox(64, "", _MozRepl_Detector())
[/autoit] [autoit][/autoit] [autoit];===============================================================================
[/autoit] [autoit][/autoit] [autoit]
#cs
AutoIt Version: 3.2.12.1
Author: Thunder-man (Frank Michalski)Script Function: _MozRepl_Detector()
[/autoit] [autoit][/autoit] [autoit]
Description: Überprüft ein Firefox Profil auf die MozRepl Erweiterung und installiert diese im Bedarfsfall.
default: $Profil = "default"
Return values: True or False
V 1.0 ==> 15.09.2007
V 1.1 ==> 02.08.2008, updated by Stilgar (Thorsten Willert)
changed the path-macro to @AppDataDir
changed the ""-profil to "default"
V1.2 ==> 03.03.2009, updated by Stilgar (Thorsten Willert)
changed MozLab to MozRepl
V2.0 ==> 17.03.2009, added intall-option for MozRepl by Stilgar (Thorsten Willert)#ce
[/autoit] [autoit][/autoit] [autoit]
;===============================================================================; [Example]
[/autoit] [autoit][/autoit] [autoit]
;~ $Result = _MozRepl_Detector()
;~ MsgBox(4096, "Result", $Result)Func _MozRepl_Detector($sProfil = "default", $bInstall = True , $sXPI = "http://repo.hyperstruct.net/mozrepl/0.2/mozrepl.xpi")
[/autoit] [autoit][/autoit] [autoit]If $sProfil = "" Then $sProfil = "default"
[/autoit] [autoit][/autoit] [autoit]Local $sIni_Pfad = @AppDataDir & "\Mozilla\Firefox\"
[/autoit] [autoit][/autoit] [autoit]Local $var = IniReadSectionNames($sIni_Pfad & "\profiles.ini")
[/autoit] [autoit][/autoit] [autoit]
If @error Then
MsgBox(4096, "", "Error occurred, probably no Firefox INI file.")
Else
For $i = 1 To $var[0]
Local $Ini_ = IniRead($sIni_Pfad & "\profiles.ini", $var[$i], "Name", "Error")
If $Ini_ = $sProfil Then
Local $sPfad_folder = IniRead($sIni_Pfad & "\profiles.ini", $var[$i], "Path", "Eror") ;Profil Ordner
ExitLoop
EndIf
Next
EndIfIf $bInstall Then
[/autoit] [autoit][/autoit] [autoit]
Local $sHKLM = "HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\Mozilla Firefox"
Local $sFFExe = RegRead($sHKLM & "\" & RegRead($sHKLM, "CurrentVersion") & "\Main", "PathToExe")
Local $sCommand = StringFormat('"%s" "%s"',$sFFExe, $sXPI)
EndIfIf StringLeft($sPfad_folder,
[/autoit]
= "Profiles" Then
If FileExists($sIni_Pfad & $sPfad_folder & "\extensions\mozrepl@hyperstruct.net") Then
Return 1
Else
If $bInstall Then Return Run($sCommand)
Return 0
EndIf
Else
If FileExists($sPfad_folder & "\extensions\mozrepl@hyperstruct.net") Then
Return 1
Else
If $bInstall Then Return Run($sCommand)
Return
EndIf
EndIf
EndFunc ;==>_MozRepl_DetectorHier der Thread: MozRepl_Detector
MfG Hellboy
-
Spoiler anzeigen
[autoit]#include <ButtonConstants.au3>
[/autoit] [autoit][/autoit] [autoit]
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>Opt('GUIOnEventMode', 1)
[/autoit] [autoit][/autoit] [autoit]Global $time,$dtime,$aktiv=0
[/autoit] [autoit][/autoit] [autoit]$Form1 = GUICreate("Ste`s Mini SD-Timer", 145, 79, 1065, 29,-1, BitOR($WS_EX_TOOLWINDOW, $WS_EX_WINDOWEDGE,$WS_EX_TOPMOST, $WS_EX_APPWINDOW))
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
GUISetBkColor(0x3D95FF)
GUISetOnEvent(-3, '_Exit')
GUISetFont(10, 800, 0, "MS Sans Serif")
$Input1=GUICtrlCreateInput("", 16, 16, 25, 24,$ES_NUMBER)
$Input2=GUICtrlCreateInput("", 64, 16, 25, 24,$ES_NUMBER)
$Label1 = GUICtrlCreateLabel(":", 48, 16, 9, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
$Label2 = GUICtrlCreateLabel("Uhr", 96, 22, 33, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
$Button1 = GUICtrlCreateButton("OK", 16, 48, 113, 25, $WS_GROUP)
GUICtrlSetOnEvent(-1, '_save')
GUISetState(@SW_SHOW)While Sleep(100)
[/autoit] [autoit][/autoit] [autoit]
$time = @HOUR & ":" & @MIN
If $aktiv=1 Then
If $time = $dtime Then
;~ MsgBox(0,"","ShutDown")
Shutdown(1)
Exit
EndIf
EndIf
WEndFunc _Exit()
[/autoit] [autoit][/autoit] [autoit]
Exit
EndFuncFunc _save()
[/autoit]
If $aktiv= 0 Then
If GUICtrlRead($Input1)="" or GUICtrlRead($Input2)="" Then
MsgBox(16,"","Keine gültige Uhrzeit angegeben!")
ElseIf GUICtrlRead($Input1)>23 or GUICtrlRead($Input2)>59 Then
MsgBox(16,"Fehler","Eines der Eingabefelder enthält einen ungültigen Wert!")
Else
$dtime=GUICtrlRead($Input1) & ":" & GUICtrlRead($Input2)
GUICtrlSetState($Input1,$GUI_DISABLE)
GUICtrlSetState($Input2,$GUI_DISABLE)
GUICtrlSetData($Button1,"Nö")
$aktiv=1
EndIf
Else
GUICtrlSetState($Input1,$GUI_ENABLE)
GUICtrlSetState($Input2,$GUI_ENABLE)
GUICtrlSetData($Button1,"OK")
$aktiv=0
EndIf
EndFuncHatte ich noch i-wo liegen, habe es geproogt weil ich abends oft aufm sofa einnicke und der PC dann stundenlang grundlos läuft


-
Funzt 1A , Danke auf dich ist Verlass

Dann ist das hier gelöst...
MfG Hellboy
-
Ich weiß nicht obs daran liegt aber probiers mal so:
[autoit]HotKeySet ("^A","_SciTEOpen")
[/autoit]MfG Hellboy
-
Hi Leute , so langsam habe ich wohl alle Fragen gestellt die man zu menüitems stellen kann aber einer geht noch :D:D
Ich möchte "im Prinzip" nur ein aus einer ListView gewähltes Menüitem in einem Menü löschen ,ich habe euch dazu dieses script erstellt
damit ihr mein Problem versteht
Spoiler anzeigen
[autoit]#include <GUIConstantsEx.au3>
[/autoit] [autoit][/autoit] [autoit]
#include <WindowsConstants.au3>
#include "ModernMenuRaw.au3"
#include <FF.au3>
#include <String.au3>
#Include <GuiListView.au3>
#include <Array.au3>
#include <GuiMenu.au3>Opt('GUIOnEventMode', 1)
[/autoit] [autoit][/autoit] [autoit]Global $R10= IniReadSectionNames(@ScriptDir & "/test.ini")
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
Global $Input1,$Input2,$add_channel,$dtform,$list,$senderinfo[99][2],$sender[99],$menu,$menu2$Form1 = GUICreate("Core @ coding", 337, 218, 348, 160)
[/autoit] [autoit][/autoit] [autoit]
GUISetOnEvent(-3, '_Exit')
$menu = GUICtrlCreateMenu("Menü")
$menu2 = GUICtrlCreateMenu("Menü2")
$deletetitel = _GUICtrlCreateODMenuItem("Sender/Song löschen",$menu2,"shell32.dll",-132)
GUICtrlSetOnEvent(-1, 'deletetitel')
$channelconfig = _GUICtrlCreateODMenuItem("Sender/Song hinzufügen",$Menu2,"shell32.dll",-217)
GUICtrlSetOnEvent(-1, '_add')
$exit = _GUICtrlCreateODMenuItem("Exit",$Menu2,"shell32.dll",-28)
GUICtrlSetOnEvent(-1, '_Exit')
for $i=1 to $R10[0]
$Temp_Read=IniReadSection(@ScriptDir & "/test.ini",$R10[$i])
$cut= _Stringbetween($Temp_Read[1][1],"http://","/")
if IsArray($cut) Then
if $cut[0]= "www.youtube.de" Or $cut[0]="www.youtube.com" Then
$sender[$i]= _GUICtrlCreateODMenuItem($R10[$i],$menu,@ScriptDir & "/youtube.ico")
GUICtrlSetOnEvent(-1, '_navigate')
$senderinfo[$i][0]=$Temp_Read[1][1]
$senderinfo[$i][1]=$R10[$i]
Else
$sender[$i]= _GUICtrlCreateODMenuItem($R10[$i],$menu,"shell32.dll",-139)
GUICtrlSetOnEvent(-1, '_navigate')
$senderinfo[$i][0]=$Temp_Read[1][1]
$senderinfo[$i][1]=$R10[$i]
EndIf
EndIf
Next$label = GUICtrlCreateLabel("TestLabel", 150, 100)
[/autoit] [autoit][/autoit] [autoit]
GUISetState(@SW_SHOW)
_FFStart("www.google.de", "default", 1, True)While Sleep(100)
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
WEndFunc _Exit()
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
_FFQuit()
Exit
EndFunc ;==>_ExitFunc _navigate()
[/autoit] [autoit][/autoit] [autoit]
$text = _GetMenuText(@GUI_CtrlId)
;~ $text=GUICtrlRead(@GUI_CtrlId,1)
MsgBox(0, "", $text)
$url = IniRead(@ScriptDir & "/test.ini", $text, "Url", "")
_FFOpenURL($url)
EndFunc ;==>_navigateFunc _add()
[/autoit] [autoit][/autoit] [autoit]
$add_channel = GUICreate("Sender/Song hinzufügen", 305, 190, 541, 178, -1, BitOR($WS_EX_TOOLWINDOW, $WS_EX_WINDOWEDGE, $WS_EX_TOPMOST, $WS_EX_APPWINDOW))
GUISetOnEvent(-3, '_addguidelete')
$Input1 = GUICtrlCreateInput("", 24, 40, 249, 21)
$Input2 = GUICtrlCreateInput("", 24, 104, 249, 21)
$Label7 = GUICtrlCreateLabel("Sender/Song-Name:", 16, 16, 150, 20)
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0xFF0000)
$Label8 = GUICtrlCreateLabel("Sender/Song-Url:", 16, 80, 150, 20)
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0xFF0000)
$save = GUICtrlCreateButton("Speichern", 16, 136, 265, 41, 0)
GUICtrlSetOnEvent(-1, '_save')
GUISetState(@SW_SHOW)
EndFunc ;==>_addFunc _addguidelete()
[/autoit] [autoit][/autoit] [autoit]
GUIDelete($add_channel)
EndFuncFunc _deleteguidelete()
[/autoit] [autoit][/autoit] [autoit]
GUIDelete($dtform)
EndFuncFunc _save()
[/autoit] [autoit][/autoit] [autoit]
IniWrite(@ScriptDir & "/test.ini", GUICtrlRead($Input1), "Url", GUICtrlRead($Input2))
GUICtrlCreateMenuItem(GUICtrlRead($Input1), $menu)
GUICtrlSetOnEvent(-1, '_navigate')
GUIDelete($add_channel)
EndFunc ;==>_saveFunc deletetitel()
[/autoit] [autoit][/autoit] [autoit]$dtform = GUICreate("Titel löschen??", 331, 352, 764, 78,-1, BitOR($WS_EX_TOOLWINDOW, $WS_EX_WINDOWEDGE, $WS_EX_APPWINDOW))
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
GUISetOnEvent(-3, '_deleteguidelete')
$list=GUICtrlCreateListView("Titel ", 0, 0, 329, 297)
$Loeschen = GUICtrlCreateButton("Löschen", 24, 304, 281, 41, 0)
GUICtrlSetOnEvent(-1, 'delete')
GUISetState(@SW_SHOW)for $i=1 to $R10[0]
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
GUICtrlCreateListViewItem($R10[$i],$list)
Next
EndFuncFunc delete()
[/autoit]
$clicked = GUICtrlRead(GUICtrlRead($list))
If not $clicked="" Then
$cut2=StringTrimRight($clicked,1)
_GUICtrlListView_DeleteItemsSelected ($list)
IniDelete(@ScriptDir & "/test.ini", $cut2)
;Und jetzt soll das gelöschte item auch aus dem Menü gelöscht werden,aber wie?????
Else
MsgBox(0,"","Kein Titel ausgewählt.")
EndIf
EndFuncDas Gesamtpaket (Ini,icon,includes) findet ihr im Anhang
Hoffe jemand kann mir helfen
MfG Hellboy
-
Naja hat sich erledigt das Problem ist scheinbar @gui_ctrlid , ein anderes system muss her....
------gelöst--------------------------------- -
Uff der code ist ganz schön verstreut und mit den ganzen funcs die du da hast da bietet sich der guionevent modus eher an außerdem fehlt die deklaration der
variable $MainguiOk hastes editiert

-
Spoiler anzeigen
[autoit]#include <ButtonConstants.au3>
[/autoit] [autoit][/autoit] [autoit]
#include <GUIConstantsEx.au3>
#include <GUIListBox.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <IE.au3>Global $Username= "root"
[/autoit] [autoit][/autoit] [autoit]
Global $PW="xxxxxxx"
Global $List1Opt('GUIOnEventMode', 1)
[/autoit] [autoit][/autoit] [autoit]#Region ### START Koda GUI section ### Form=
[/autoit] [autoit][/autoit] [autoit]
$Form2 = GUICreate("EasyBox 602 Manager", 591, 349, 464, 189)
GUISetOnEvent(-3, '_Exit')
$Group1 = GUICtrlCreateGroup(" Informationen ", 8, 8, 369, 329, $BS_FLAT)
$List1 = GUICtrlCreateList("", 16, 24, 353, 305, BitOR($WS_VSCROLL,$WS_BORDER))
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Button3 = GUICtrlCreateButton("Fenster schließen", 392, 312, 187, 25, $WS_GROUP)
GUICtrlSetOnEvent(-1, '_Exit')
$Group2 = GUICtrlCreateGroup("Befehle", 384, 8, 201, 177)
$Button1 = GUICtrlCreateButton("Neue IP besorgen", 392, 24, 187, 73, $WS_GROUP)
GUICtrlSetOnEvent(-1, '_newIP')
$Button2 = GUICtrlCreateButton("Aktuelle Verbindungsinfos", 392, 104, 187, 73, $WS_GROUP)
GUICtrlSetOnEvent(-1, '_verbindungsinfos')
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###While Sleep(100)
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
WEndFunc _newIP()
[/autoit] [autoit][/autoit] [autoit]
GUICtrlSetData($List1, "")
; #######################################################
; Neu Verbinden
; #######################################################
; Loginform
$IE=_IECreate("http://192.168.2.1", 0, 1)
$form = _IEGetObjById($ie,'tF')
$object = _IEGetObjByName($ie,'user')
_IEFormElementSetValue($object, $Username)
$object2 = _IEGetObjByName($ie,'pws')
_IEFormElementSetValue($object2, $PW)
_IEFormSubmit($form)
_GUICtrlListBox_ResetContent($List1)
GUICtrlSetData($List1, "Restarte Internetverbindung")
GUICtrlSetData($List1, "Dies wird ca 20 Sekunden dauern.")
GUICtrlSetData($List1, "Bitte warten...")
Sleep(2000)
;Zum Button navigieren
;Hier Anpassen!!!!
Send("{TAB 28}")
Send("{SPACE}")
_IEQuit($IE)
Sleep(20000)
; Neu Verbunden
$ie=_IECreate("http://192.168.2.1", 0, 0)
$form = _IEGetObjById($ie,'tF')
$object = _IEGetObjByName($ie,'user')
_IEFormElementSetValue($object, $Username)
$object2 = _IEGetObjByName($ie,'pws')
_IEFormElementSetValue($object2, $PW)
_IEFormSubmit($form)
_IEQuit($ie)
;eingeloggt
GUICtrlSetData($List1, "Verbindungsinformationen:")
GUICtrlSetData($List1, "--------------------------------------")$ie=_IECreate("http://192.168.2.1/status_main.stm", 0, 0)
[/autoit] [autoit][/autoit] [autoit]
$form = _IEGetObjById($ie,'tF')
$object = _IEGetObjByName($ie,'user')
_IEFormElementSetValue($object, $Username)
$object2 = _IEGetObjByName($ie,'pws')
_IEFormElementSetValue($object2, $PW)
_IEFormSubmit($form)$body = _IEBodyReadTEXT($ie)
[/autoit] [autoit][/autoit] [autoit]
$bodyArray = StringSplit($body, @LF)
For $x=1 to $bodyArray[0]
If StringInStr($bodyArray[$x],"adsl:")<>0 then
$bodyFound = $bodyArray[$x]
$bodyToken = StringSplit($bodyFound, " ")
GUICtrlSetData($List1, "Verbindung: " & $bodyToken[2] & " " & $bodyToken[3])
EndIf
If StringInStr($bodyArray[$x],"modus:")<>0 then
$bodyFound = $bodyArray[$x]
$bodyToken = StringSplit($bodyFound, " ")
GUICtrlSetData($List1, "Modus: " & $bodyToken[3] & " " & $bodyToken[4])
EndIf
If StringInStr($bodyArray[$x],"download:")<>0 then
$bodyFound = $bodyArray[$x]
$bodyToken = StringSplit($bodyFound, " ")
GUICtrlSetData($List1, "Download: " & $bodyToken[2] & " " & $bodyToken[3] & "kbps")
EndIf
If StringInStr($bodyArray[$x],"upload:")<>0 then
$bodyFound = $bodyArray[$x]
$bodyToken = StringSplit($bodyFound, " ")
GUICtrlSetData($List1, "Upload: " & $bodyToken[2] & " " & $bodyToken[3] & "kbps")
EndIf
If StringInStr($bodyArray[$x],"wan ip:")<>0 then
$bodyFound = $bodyArray[$x]
$bodyToken = StringSplit($bodyFound, " ")
GUICtrlSetData($List1, "Wan IP: " & $bodyToken[3] & " " & $bodyToken[4])
EndIf
If StringInStr($bodyArray[$x],"dhcp server:")<>0 then
$bodyFound = $bodyArray[$x]
$bodyToken = StringSplit($bodyFound, " ")
GUICtrlSetData($List1, "DHCP Server: " & $bodyToken[3])
EndIf
If StringInStr($bodyArray[$x],"Anzahl DHCP-Clients")<>0 then
$bodyFound = $bodyArray[$x]
$bodyToken = StringSplit($bodyFound, " ")
GUICtrlSetData($List1, "DHCP Clients connected: " & $bodyToken[3] & " " & $bodyToken[4])
EndIf
Next
_IEQuit($ie)
EndFuncFunc _verbindungsinfos()
[/autoit] [autoit][/autoit] [autoit]
$ie=_IECreate("http://192.168.2.1", 0, 0)
$form = _IEGetObjById($ie,'tF')
$object = _IEGetObjByName($ie,'user')
_IEFormElementSetValue($object, $Username)
$object2 = _IEGetObjByName($ie,'pws')
_IEFormElementSetValue($object2, $PW)
_IEFormSubmit($form)
_IEQuit($ie)
;eingeloggt
_GUICtrlListBox_ResetContent($List1)
GUICtrlSetData($List1, "Verbindungsinformationen:")
GUICtrlSetData($List1, "--------------------------------------")$ie=_IECreate("http://192.168.2.1/status_main.stm", 0, 0)
[/autoit] [autoit][/autoit] [autoit]
$form = _IEGetObjById($ie,'tF')
$object = _IEGetObjByName($ie,'user')
_IEFormElementSetValue($object, $Username)
$object2 = _IEGetObjByName($ie,'pws')
_IEFormElementSetValue($object2, $PW)
_IEFormSubmit($form)$body = _IEBodyReadTEXT($ie)
[/autoit] [autoit][/autoit] [autoit]
$bodyArray = StringSplit($body, @LF)
For $x=1 to $bodyArray[0]
If StringInStr($bodyArray[$x],"adsl:")<>0 then
$bodyFound = $bodyArray[$x]
$bodyToken = StringSplit($bodyFound, " ")
GUICtrlSetData($List1, "Verbindung: " & $bodyToken[2] & " " & $bodyToken[3])
EndIf
If StringInStr($bodyArray[$x],"modus:")<>0 then
$bodyFound = $bodyArray[$x]
$bodyToken = StringSplit($bodyFound, " ")
GUICtrlSetData($List1, "Modus: " & $bodyToken[3] & " " & $bodyToken[4])
EndIf
If StringInStr($bodyArray[$x],"download:")<>0 then
$bodyFound = $bodyArray[$x]
$bodyToken = StringSplit($bodyFound, " ")
GUICtrlSetData($List1, "Download: " & $bodyToken[2] & " " & $bodyToken[3] & "kbps")
EndIf
If StringInStr($bodyArray[$x],"upload:")<>0 then
$bodyFound = $bodyArray[$x]
$bodyToken = StringSplit($bodyFound, " ")
GUICtrlSetData($List1, "Upload: " & $bodyToken[2] & " " & $bodyToken[3] & "kbps")
EndIf
If StringInStr($bodyArray[$x],"wan ip:")<>0 then
$bodyFound = $bodyArray[$x]
$bodyToken = StringSplit($bodyFound, " ")
GUICtrlSetData($List1, "Wan IP: " & $bodyToken[3] & " " & $bodyToken[4])
EndIf
If StringInStr($bodyArray[$x],"dhcp server:")<>0 then
$bodyFound = $bodyArray[$x]
$bodyToken = StringSplit($bodyFound, " ")
GUICtrlSetData($List1, "DHCP Server: " & $bodyToken[3])
EndIf
If StringInStr($bodyArray[$x],"Anzahl DHCP-Clients")<>0 then
$bodyFound = $bodyArray[$x]
$bodyToken = StringSplit($bodyFound, " ")
GUICtrlSetData($List1, "DHCP Clients connected: " & $bodyToken[3] & " " & $bodyToken[4])
EndIf
Next
_IEQuit($ie)
EndFuncFunc _Exit()
[/autoit]
Exit
EndFuncVersuch das mal wenn das nicht funzt dann liegt`s wahrscheinlich am Send , siehe AutoBert

-
[autoit]
Global $i, $Dir,$Durchsuchen
[/autoit]Einfach ersetzen oder?
-
Die Schleifen in der schleife müssen glaub ich raus
-
Ich sehe keinen grund wieso die Schleife spinnen sollte aber ich habe mal die Button1 funktion aus der schleife genommen und einfach mal in ne
Func gepackt , versuchs jetzt mal , wer weiß....Spoiler anzeigen
[autoit]$Username= "root"
[/autoit] [autoit][/autoit] [autoit]
$PW="xxxxxxx"#include <ButtonConstants.au3>
[/autoit] [autoit][/autoit] [autoit]
#include <GUIConstantsEx.au3>
#include <GUIListBox.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <IE.au3>#Region ### START Koda GUI section ### Form=
[/autoit] [autoit][/autoit] [autoit]
$Form2 = GUICreate("EasyBox 602 Manager", 591, 349, 464, 189)
$Group1 = GUICtrlCreateGroup(" Informationen ", 8, 8, 369, 329, $BS_FLAT)
$List1 = GUICtrlCreateList("", 16, 24, 353, 305, BitOR($WS_VSCROLL,$WS_BORDER))
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Button3 = GUICtrlCreateButton("Fenster schließen", 392, 312, 187, 25, $WS_GROUP)
$Group2 = GUICtrlCreateGroup("Befehle", 384, 8, 201, 177)
$Button1 = GUICtrlCreateButton("Neue IP besorgen", 392, 24, 187, 73, $WS_GROUP)
$Button2 = GUICtrlCreateButton("Aktuelle Verbindungsinfos", 392, 104, 187, 73, $WS_GROUP)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###While 1
[/autoit] [autoit][/autoit] [autoit]
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button2
$ie=_IECreate("http://192.168.2.1", 0, 0)
$form = _IEGetObjById($ie,'tF')
$object = _IEGetObjByName($ie,'user')
_IEFormElementSetValue($object, $Username)
$object2 = _IEGetObjByName($ie,'pws')
_IEFormElementSetValue($object2, $PW)
_IEFormSubmit($form)
_IEQuit($ie)
;eingeloggt
_GUICtrlListBox_ResetContent($List1)
GUICtrlSetData($List1, "Verbindungsinformationen:")
GUICtrlSetData($List1, "--------------------------------------")$ie=_IECreate("http://192.168.2.1/status_main.stm", 0, 0)
[/autoit] [autoit][/autoit] [autoit]
$form = _IEGetObjById($ie,'tF')
$object = _IEGetObjByName($ie,'user')
_IEFormElementSetValue($object, $Username)
$object2 = _IEGetObjByName($ie,'pws')
_IEFormElementSetValue($object2, $PW)
_IEFormSubmit($form)$body = _IEBodyReadTEXT($ie)
[/autoit] [autoit][/autoit] [autoit]
$bodyArray = StringSplit($body, @LF)
For $x=1 to $bodyArray[0]
If StringInStr($bodyArray[$x],"adsl:")<>0 then
$bodyFound = $bodyArray[$x]
$bodyToken = StringSplit($bodyFound, " ")
GUICtrlSetData($List1, "Verbindung: " & $bodyToken[2] & " " & $bodyToken[3])
EndIf
If StringInStr($bodyArray[$x],"modus:")<>0 then
$bodyFound = $bodyArray[$x]
$bodyToken = StringSplit($bodyFound, " ")
GUICtrlSetData($List1, "Modus: " & $bodyToken[3] & " " & $bodyToken[4])
EndIf
If StringInStr($bodyArray[$x],"download:")<>0 then
$bodyFound = $bodyArray[$x]
$bodyToken = StringSplit($bodyFound, " ")
GUICtrlSetData($List1, "Download: " & $bodyToken[2] & " " & $bodyToken[3] & "kbps")
EndIf
If StringInStr($bodyArray[$x],"upload:")<>0 then
$bodyFound = $bodyArray[$x]
$bodyToken = StringSplit($bodyFound, " ")
GUICtrlSetData($List1, "Upload: " & $bodyToken[2] & " " & $bodyToken[3] & "kbps")
EndIf
If StringInStr($bodyArray[$x],"wan ip:")<>0 then
$bodyFound = $bodyArray[$x]
$bodyToken = StringSplit($bodyFound, " ")
GUICtrlSetData($List1, "Wan IP: " & $bodyToken[3] & " " & $bodyToken[4])
EndIf
If StringInStr($bodyArray[$x],"dhcp server:")<>0 then
$bodyFound = $bodyArray[$x]
$bodyToken = StringSplit($bodyFound, " ")
GUICtrlSetData($List1, "DHCP Server: " & $bodyToken[3])
EndIf
If StringInStr($bodyArray[$x],"Anzahl DHCP-Clients")<>0 then
$bodyFound = $bodyArray[$x]
$bodyToken = StringSplit($bodyFound, " ")
GUICtrlSetData($List1, "DHCP Clients connected: " & $bodyToken[3] & " " & $bodyToken[4])
EndIf
Next
_IEQuit($ie)
Case $Button3
Exit
Case $Button1
_newIP()EndSwitch
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
WEndFunc _newIP()
[/autoit] [autoit][/autoit] [autoit]
GUICtrlSetData($List1, "")
; #######################################################
; Neu Verbinden
; #######################################################
; Loginform
$IE=_IECreate("http://192.168.2.1", 0, 1)
$form = _IEGetObjById($ie,'tF')
$object = _IEGetObjByName($ie,'user')
_IEFormElementSetValue($object, $Username)
$object2 = _IEGetObjByName($ie,'pws')
_IEFormElementSetValue($object2, $PW)
_IEFormSubmit($form)
_GUICtrlListBox_ResetContent($List1)
GUICtrlSetData($List1, "Restarte Internetverbindung")
GUICtrlSetData($List1, "Dies wird ca 20 Sekunden dauern.")
GUICtrlSetData($List1, "Bitte warten...")
Sleep(2000)
;Zum Button navigieren
;Hier Anpassen!!!!
Send("{TAB 28}")
Send("{SPACE}")
_IEQuit($IE)
Sleep(20000)
; Neu Verbunden
$ie=_IECreate("http://192.168.2.1", 0, 0)
$form = _IEGetObjById($ie,'tF')
$object = _IEGetObjByName($ie,'user')
_IEFormElementSetValue($object, $Username)
$object2 = _IEGetObjByName($ie,'pws')
_IEFormElementSetValue($object2, $PW)
_IEFormSubmit($form)
_IEQuit($ie)
;eingeloggt
GUICtrlSetData($List1, "Verbindungsinformationen:")
GUICtrlSetData($List1, "--------------------------------------")$ie=_IECreate("http://192.168.2.1/status_main.stm", 0, 0)
[/autoit] [autoit][/autoit] [autoit]
$form = _IEGetObjById($ie,'tF')
$object = _IEGetObjByName($ie,'user')
_IEFormElementSetValue($object, $Username)
$object2 = _IEGetObjByName($ie,'pws')
_IEFormElementSetValue($object2, $PW)
_IEFormSubmit($form)$body = _IEBodyReadTEXT($ie)
[/autoit] [autoit][/autoit] [autoit][/autoit]
$bodyArray = StringSplit($body, @LF)
For $x=1 to $bodyArray[0]
If StringInStr($bodyArray[$x],"adsl:")<>0 then
$bodyFound = $bodyArray[$x]
$bodyToken = StringSplit($bodyFound, " ")
GUICtrlSetData($List1, "Verbindung: " & $bodyToken[2] & " " & $bodyToken[3])
EndIf
If StringInStr($bodyArray[$x],"modus:")<>0 then
$bodyFound = $bodyArray[$x]
$bodyToken = StringSplit($bodyFound, " ")
GUICtrlSetData($List1, "Modus: " & $bodyToken[3] & " " & $bodyToken[4])
EndIf
If StringInStr($bodyArray[$x],"download:")<>0 then
$bodyFound = $bodyArray[$x]
$bodyToken = StringSplit($bodyFound, " ")
GUICtrlSetData($List1, "Download: " & $bodyToken[2] & " " & $bodyToken[3] & "kbps")
EndIf
If StringInStr($bodyArray[$x],"upload:")<>0 then
$bodyFound = $bodyArray[$x]
$bodyToken = StringSplit($bodyFound, " ")
GUICtrlSetData($List1, "Upload: " & $bodyToken[2] & " " & $bodyToken[3] & "kbps")
EndIf
If StringInStr($bodyArray[$x],"wan ip:")<>0 then
$bodyFound = $bodyArray[$x]
$bodyToken = StringSplit($bodyFound, " ")
GUICtrlSetData($List1, "Wan IP: " & $bodyToken[3] & " " & $bodyToken[4])
EndIf
If StringInStr($bodyArray[$x],"dhcp server:")<>0 then
$bodyFound = $bodyArray[$x]
$bodyToken = StringSplit($bodyFound, " ")
GUICtrlSetData($List1, "DHCP Server: " & $bodyToken[3])
EndIf
If StringInStr($bodyArray[$x],"Anzahl DHCP-Clients")<>0 then
$bodyFound = $bodyArray[$x]
$bodyToken = StringSplit($bodyFound, " ")
GUICtrlSetData($List1, "DHCP Clients connected: " & $bodyToken[3] & " " & $bodyToken[4])
EndIf
Next
_IEQuit($ie)
EndFuncIch würde dir aber raten GUISetOnEvent zu verwenden

MfG Hellboy
-
Zitat
Hmm.... merkwürdig, eigentlich kann man nicht verlieren. Wie hast du es geschafft nicht weiter zu kommen

oder hab ich da einen fehler eingebaut

Unmöglich ich habs problemlos durchspielen können
, echt nett gemacht du wirst auch immer besser was spiele angeht 
MfG Hellboy
-
Hat da keiner ne Idee?
Wer Win7 hat könnte gleich mittesten ob das script überhaupt funzt, was bei yxyx nicht der fall war
-
Jo mit progressbars noch besser

-
Hallo Leute, nach langer überlegung habe ich mich dazu entschlossen mein Script zu posten.
Mein Problem ist das ich mein Script nach dem hinzufügen eines senders bzw. yt-songs nicht neustarten möchte sondern einfach
das menü aktualisieren soll.
Das script ist jetzt nicht gerade groß aber man muss sich zumindest etwas einlesen, um das Script überhaupt nutzen zu können
Außerdem wird Firefox und MozRepl benötigt.Spoiler anzeigen
Gelöst
Das mit dem Fileinstall ist etwas unschön gelöst aber egal :D:D
Edit: Die Funktion _save ist also mein anliegen
Edit2: Problem "gelöst"MfG Hellboy
-
Zitat
so haben Pädophile praktisch ein "Inhaltsverzeichnis" von sogenannten kinderpornographischen Webseiten
Oh mein Gott , praktisch eine favoritenliste für pädophile?

BugFix bin ganz deiner Meinung, die ursache muss bekämpft werden nicht ihre Folgen....
MfG hellboy
Edit: Ich dachte suchmaschinen wie google und co. filtern solche seiten sowieso raus??? ich zumindest hatte noch nicht das pech auf
solche verabscheuliche Seiten zu kommen .... -
was meinst du mit internetverbindung genau , sind die rechner alle in einem netzwerk?
Ich kanns mit auch nur mit der methode von stayawayknight vorstellen.
-
Ne vermutung , ist das script i-wie makiert und wird durch das Send (enter) neu ausgeführt?