Bitte. Den Thread dann auch als gelöst markieren, bitte, danke.
Beiträge von funkey
-
-
Spoiler anzeigen
[autoit]#include <IE.au3>
[/autoit] [autoit][/autoit] [autoit]$oIE = _IECreate('http://sen.pytalhost.de/Ghost/Index.php')
[/autoit]
$oForm = _IEFormGetCollection($oIE, 0)
$oTextarea = _IEFormElementGetObjByName($OForm, 'notiz')
_IEFormElementSetValue($oTextarea, 'Neuer Text')
_IEFormSubmit($oForm) -
Hätte es so probiert, kann es ja aber leider nicht testen.
Spoiler anzeigen
[autoit]$Struct = DllStructCreate('char[2]')
[/autoit] [autoit][/autoit] [autoit]
DllStructSetData($Struct, 1, "GROUP1")
DllStructSetData($Struct, 2, "GROUP2")$objDll = DllOpen("SMSRsGen.dll")
[/autoit]
$intResult = DllCall($objDll, "int", "DDRAddStringArray", "str", "System Group Name", "ptr", DllStructGetPtr($Struct), "int", 2, "int", 64, "dword", 16)
DllClose($objDll) -
Das kann ja nicht gehen, wenn du nur eine Variable veränderst!
Spoiler anzeigen
[autoit]#include <GDIPlus.au3>
[/autoit] [autoit][/autoit] [autoit]
#include <WindowsConstants.au3>
#include <GUIConstantsEx.au3>Global $index, $hPen
[/autoit] [autoit][/autoit] [autoit]
Global Const $Pi = 4 * ATan(1)
Global $x1 = @DesktopWidth / 2
Global $y1 = @DesktopHeight / 2
Global $x2 = 0, $y2 = 0
Global $radians = 180 * 2.50
Global $i$GUI_Handle = GUICreate("GDI+", 1024, 768)
[/autoit] [autoit][/autoit] [autoit]
GUISetBkColor(0x000000)
GUISetState(@SW_SHOW)
$hWnd = WinGetHandle($GUI_Handle)_GDIPlus_Startup()
[/autoit] [autoit][/autoit] [autoit]
$hGraphic = _GDIPlus_GraphicsCreateFromHWND($hWnd)
_GDIPlus_GraphicsSetSmoothingMode($hGraphic, 4) ; AntiAliasLine_Color()
[/autoit] [autoit][/autoit] [autoit]While 1
[/autoit] [autoit][/autoit] [autoit]
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Quit()EndSwitch
[/autoit] [autoit][/autoit] [autoit]_GDIPlus_GraphicsDrawLine($hGraphic, $x1, $y1, $x2, $y2, $hPen) ;draw line
[/autoit] [autoit][/autoit] [autoit]
_GDIPlus_PenDispose($hPen)
Line_Color()If $x2 < @DesktopWidth And $y2 = 0 Then
[/autoit] [autoit][/autoit] [autoit]
$x2 += 1
ElseIf $x2 = @DesktopWidth And $y2 < @DesktopHeight Then
$y2 +=1
ElseIf $y2 = @DesktopHeight And $x2 > 0 Then
$x2 -= 1
Else
$y2 -=1
EndIf;~ Sleep(10)
[/autoit] [autoit][/autoit] [autoit]
WEndFunc Line_Color() ;thanks to monoceres for the code
[/autoit] [autoit][/autoit] [autoit]
Local $RedM = 1, $BlueM = 1.25, $GreenM = 1.50
$index += 0.0075
$color = "0x2F" & Hex(255 * ((Sin($index * $RedM) + 1) / 2), 2) & Hex(255 * ((Sin($index * $GreenM) + 1) / 2), 2) & Hex(255 * ((Sin($index * $BlueM) + 1) / 2), 2)
$hPen = _GDIPlus_PenCreate($color)
EndFunc ;==>Line_ColorFunc Quit() ; exit program
[/autoit]
_GDIPlus_PenDispose($hPen)
_GDIPlus_GraphicsDispose($hGraphic)
_GDIPlus_Shutdown()
Exit
EndFunc ;==>Quit -
Da wirst du wohl
[autoit]DllStructCreate
[/autoit]
DllStructSetDatabenötigen.
-
Hallo Scripter192;
wenn du die eine Zeile Code einfach posten würdest, dann bräuchte niemand lang zu raten, was falsch ist!
-
Hallo!
Hab in der Hilfe eine Funktion gefunden, mittels derer man ein (Kontext-)Menü an beliebiger Stelle aufrufen kann. Hab das ganze gleich mal zweckentfremdet

Spoiler anzeigen
[autoit]Opt('GUIOnEventMode', 1)
[/autoit] [autoit][/autoit] [autoit]Global $hGui = GUICreate("Mein eigenes Menü", 270, 140, -1, -1);, 0x80000000)
[/autoit] [autoit][/autoit] [autoit]
GUISetOnEvent(-3, '_Exit')GUICtrlCreateLabel('Das Menü befindet sich unterhalb ;)', 50, 15)
[/autoit] [autoit][/autoit] [autoit]GUICtrlCreateLabel('', 0, 48, 270, 2, 0x1000)
[/autoit] [autoit][/autoit] [autoit]$MenueDatei = GUICtrlCreateLabel('&Datei', 95, 50, 40, 19, 0x201)
[/autoit] [autoit][/autoit] [autoit]
GUICtrlSetOnEvent(-1, '_MenuPressed')$DateiContext = GUICtrlCreateContextMenu(GUICtrlCreateDummy())
[/autoit] [autoit][/autoit] [autoit]
$OptionsOpen = GUICtrlCreateMenuItem("Ö&ffnen", $DateiContext)
$OptionsClose = GUICtrlCreateMenuItem("S&chließen", $DateiContext)
GUICtrlCreateMenuItem("", $DateiContext)
$OptionsExit = GUICtrlCreateMenuItem("B&eenden", $DateiContext)
GUICtrlSetOnEvent(-1, '_Exit')$MenueHelp = GUICtrlCreateLabel("&Hilfe", 135, 50, 30, 19, 0x201)
[/autoit] [autoit][/autoit] [autoit]
GUICtrlSetOnEvent(-1, '_MenuPressed')$HelpContext = GUICtrlCreateContextMenu(GUICtrlCreateDummy())
[/autoit] [autoit][/autoit] [autoit]
$HelpWWW = GUICtrlCreateMenuItem("&Website", $HelpContext)
GUICtrlSetOnEvent(-1, '_Website')
GUICtrlCreateMenuItem("", $HelpContext)
$HelpAbout = GUICtrlCreateMenuItem("Ü&ber...", $HelpContext)
GUICtrlSetOnEvent(-1, '_About')GUICtrlCreateLabel('', 0, 70, 270, 2, 0x1000)
[/autoit] [autoit][/autoit] [autoit]GUISetState()
[/autoit] [autoit][/autoit] [autoit]Global $AccelKeys[2][2]=[["!d", $MenueDatei], ["!h", $MenueHelp]]
[/autoit] [autoit][/autoit] [autoit]
GUISetAccelerators($AccelKeys)While 1
[/autoit] [autoit][/autoit] [autoit]
Sleep(10000)
WEndFunc _Exit()
[/autoit] [autoit][/autoit] [autoit]
Exit
EndFuncFunc _MenuPressed()
[/autoit] [autoit][/autoit] [autoit]
Switch @GUI_CtrlId
Case $MenueDatei
ShowMenu($hGui, $MenueDatei, $DateiContext)
Case $MenueHelp
ShowMenu($hGui, $MenueHelp, $HelpContext)
EndSwitch
EndFuncFunc _About()
[/autoit] [autoit][/autoit] [autoit]
MsgBox(64, "About...", "Beispiel für ein eigenes Menü")
EndFuncFunc _Website()
[/autoit] [autoit][/autoit] [autoit]
MsgBox(64, "Website...", "www.autoit.de")
EndFunc; Show a menu in a given GUI window which belongs to a given GUI ctrl
[/autoit] [autoit][/autoit] [autoit]
Func ShowMenu($hWnd, $CtrlID, $nContextID)
Local $arPos, $x, $y
Local $hMenu = GUICtrlGetHandle($nContextID)
$arPos = ControlGetPos($hWnd, "", $CtrlID)
$x = $arPos[0]
$y = $arPos[1] + $arPos[3]
ClientToScreen($hWnd, $x, $y)
TrackPopupMenu($hWnd, $hMenu, $x, $y)
EndFunc ;==>ShowMenu; Convert the client (GUI) coordinates to screen (desktop) coordinates
[/autoit] [autoit][/autoit] [autoit]
Func ClientToScreen($hWnd, ByRef $x, ByRef $y)
Local $stPoint = DllStructCreate("int;int")
DllStructSetData($stPoint, 1, $x)
DllStructSetData($stPoint, 2, $y)DllCall("user32.dll", "int", "ClientToScreen", "hwnd", $hWnd, "ptr", DllStructGetPtr($stPoint))
[/autoit] [autoit][/autoit] [autoit]
$x = DllStructGetData($stPoint, 1)
$y = DllStructGetData($stPoint, 2)
; release Struct not really needed as it is a local
$stPoint = 0
EndFunc ;==>ClientToScreen; Show at the given coordinates (x, y) the popup menu (hMenu) which belongs to a given GUI window (hWnd)
[/autoit]
Func TrackPopupMenu($hWnd, $hMenu, $x, $y)
DllCall("user32.dll", "int", "TrackPopupMenuEx", "hwnd", $hMenu, "int", 0, "int", $x, "int", $y, "hwnd", $hWnd, "ptr", 0)
EndFunc ;==>TrackPopupMenu -
Das Ergebnis stimmt, es dauert aber ca. 20 Minuten

Spoiler anzeigen
[autoit];~ (230911 hoch 1721) mod 263713 = 1715
[/autoit] [autoit][/autoit] [autoit]
#include 'BigNum.au3'Local $Ergebnis = 230911
[/autoit] [autoit][/autoit] [autoit]For $i = 1 To 1720
[/autoit] [autoit][/autoit] [autoit]
$Ergebnis = _BigNum_Mul($Ergebnis, 230911)
NextMsgBox(0,"", _BigNum_Mod($Ergebnis, 263713))
[/autoit] [autoit][/autoit] [autoit][/autoit] -
Hast du das schon gesehen?
_captcha -
-
Hier ein Beispiel für den OnEvent-Modus:
Spoiler anzeigen
[autoit]#include <GUIConstantsEx.au3>
[/autoit] [autoit][/autoit] [autoit]
#include <windowsconstants.au3>Opt('GUIOnEventMode', 1)
[/autoit] [autoit][/autoit] [autoit]$GUI = GUICreate("On-Event-Modus")
[/autoit] [autoit][/autoit] [autoit]
GUISetOnEvent(-3, '_Exit')For $i = 0 To 18
[/autoit] [autoit][/autoit] [autoit]
GUICtrlCreateButton('Button ' & $i + 1, 10, 10 + 20 * $i, 50, 18)
GUICtrlSetOnEvent(-1, '_Button_Clicked')
NextGUISetState()
[/autoit] [autoit][/autoit] [autoit]While True
[/autoit] [autoit][/autoit] [autoit]
Sleep(10000)
WEndFunc _Exit()
[/autoit] [autoit][/autoit] [autoit]
Exit
EndFunc ;==>_ExitFunc _Button_Clicked()
[/autoit]
MsgBox(0, "Button", GUICtrlRead(@GUI_CtrlId))
EndFunc ;==>_Button_Clicked -
Nicht schlecht!
Aber wie Nuts bereits gesagt hat ist es noch ziemlich lang.
Schnell gekürzte Fassung
[autoit]GUICreate("Diagramm")
[/autoit] [autoit][/autoit] [autoit]
GUICtrlCreateDiagramm(30, 30, 300, 200, -1, 10, "", 20, 0xFF9933, 30, 0x33FF00, 50, 0xabc, 100, 0x50aa50)
GUISetState()Do
[/autoit] [autoit][/autoit] [autoit]
Until GUIGetMsg() = -3Func GUICtrlCreateDiagramm($left, $top, $width, $height, $color, $d1, $c1, $d2 = "", $c2 = "", $d3 = "", $c3 = "", $d4 = "", $c4 = "", $d5 = "", $c5 = "", _
[/autoit] [autoit][/autoit] [autoit]
$d6 = "", $c6 = "", $d7 = "", $c7 = "", $d8 = "", $c8 = "", $d9 = "", $c9 = "", $d10 = "", $c10 = "")If Not $color = "-1" Then GUICtrlSetBkColor(-1, $color)
[/autoit] [autoit][/autoit] [autoit]
Local $anzahl = Ceiling((@NumParams -5) / 2);Höhe der Balken berechnen:
[/autoit] [autoit][/autoit] [autoit]
Local $BalkenHoehe = (($height - 20) / $anzahl) - 3;1 Prozent des Balken berechnen:
[/autoit] [autoit][/autoit] [autoit]
Local $Prozent = ($width - 20) / 100
;Erstellen der Balken:For $i = 1 To $anzahl
[/autoit]
Assign('balken'&$i, GUICtrlCreateGraphic($left + 10, $top + 10 + $BalkenHoehe *($i-1), $Prozent * Execute('$d'&$i), $BalkenHoehe))
GUICtrlSetBkColor(-1, Execute('$c'&$i))
$balken2 = GUICtrlCreateLabel(Execute('$d'&$i) & "%", $width + 50, $top + 10 + 7 + $BalkenHoehe*($i-1))
If Not $color = "" Then GUICtrlSetBkColor(-1, $color)
GUICtrlSetColor(-1, Execute('$c'&$i))
Next
EndFunc ;==>GUICtrlCreateDiagrammDa kann man aber auch noch einiges verbessern.
-
Spoiler anzeigen
[autoit]#include 'rmchart.au3'
[/autoit] [autoit][/autoit] [autoit]Opt('GUIOnEventMode', 1)
[/autoit] [autoit][/autoit] [autoit]Global $hGUI = GUICreate("Chart Test", 700, 500)
[/autoit] [autoit][/autoit] [autoit]
GUISetOnEvent(-3, '_Exit')Global $ChartID = 2101, $struct
[/autoit] [autoit][/autoit] [autoit]
Global $ChartDefinition = '00003600|00004450|000051|000061|00009412|00011Tahoma|100011|100035|' & _
'100045|10005-5|10006-5|1000910|100101|100112|100181|100481|10063-1|100652|100680|100690|1007011|' & _
'100718|1007612|100810|10082100|1008311|100848|100899|100950|10096100|1009711|100988|101040|10105100|' & _
'1010611|101078|101131|110011|1100270|1100470|110061|1102121|110221|110235|110241|110255|110271|110531*2*3*4*5|110544*2*0*2*4'_RMC_LoadDLL("rmchart.dll")
[/autoit] [autoit][/autoit] [autoit]
_RMC_CreateChartFromFile($hGUI, $ChartID, 10, 10, 0, $ChartDefinition)
_RMC_Draw($ChartID)GUISetState()
[/autoit] [autoit][/autoit] [autoit]While 1
[/autoit] [autoit][/autoit] [autoit]
Sleep(10000)
WEndFunc _Exit()
[/autoit]
Exit
EndFunc -
WEnn es funktioniert (was ich bei C# stark bezweifle) dann erhälst du die Rückgabe in $aRes[0] und nicht in $aRes.
-
[autoit]Zitat von PokerFaceOder gibt es ne Möglichkeit die Adressleiste auszulesen? Irgendwie muss das ja gehen
#include <IE.au3>
[/autoit][autoit][/autoit][autoit]$oIE = _IECreate('www.google.at')
[/autoit]
MsgBox(0,"", _IEPropertyGet($oIE, "locationurl")) -
Hab da was von Progandy bekommen. Mit ein paar Beispielen und genannten Links und damit kommst du bestimmt weiter

-
Sieht so aus als ob das außer leviathan nicht wirklich viele hier machen würden. Warscheinlich habt ihr einfach zu wenig Berge zum Klettern oder ihr habt wegen AutoIt keine Zeit dafür.
Ich kann euch nur sagen: Ihr verpasst etwas!
-
Spoiler anzeigen
[autoit]#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
[/autoit] [autoit][/autoit] [autoit]
#AutoIt3Wrapper_icon=D:\AutoIT\icon.ico
#AutoIt3Wrapper_UseUpx=n
#AutoIt3Wrapper_UseAnsi=y
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****; Dank an das AutoIt Forum hier Andy und alle die geholfen haben!!!
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
#include <GuiListView.au3>
#include <ListBoxConstants.au3>
#include <ListViewConstants.au3>
#include <WindowsConstants.au3>
#include <File.au3>
#include <GUIConstantsEx.au3>Opt("GUIOnEventMode", 1)
[/autoit] [autoit][/autoit] [autoit]Global $aIn[1]
[/autoit] [autoit][/autoit] [autoit]Local $iExWindowStyle = BitOR($WS_EX_DLGMODALFRAME, $WS_EX_CLIENTEDGE, $LBS_EXTENDEDSEL)
[/autoit] [autoit][/autoit] [autoit]
Local $iExListViewStyle = BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_GRIDLINES, $LVS_EX_CHECKBOXES, $LVS_EX_DOUBLEBUFFER, $LVS_EX_TRACKSELECT)_FileReadToArray("_inhalt2.txt", $aIn) ; hier angepsst
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
For $i = 1 To $aIn[0]
$aIn[$i] = StringReplace(StringStripWS($aIn[$i], 7), "|", "|", 5) ; hier angepsst
Next
_FileWriteFromArray("inhalt2_out.txt", $aIn, 2) ; hier angepsstGUICreate("listview items", 1250, 530, 10, 10, -1) ; hier angepsst
[/autoit] [autoit][/autoit] [autoit]$listview = GUICtrlCreateListView($aIn[1], 10, 10, 1230, 510, $iExWindowStyle, $iExListViewStyle) ; hier angepsst
[/autoit] [autoit][/autoit] [autoit]
_GUICtrlListView_SetExtendedListViewStyle($listview, $iExListViewStyle)$context = GUICtrlCreateContextMenu($listview) ;contextmenu, rechtsklick zum kopieren
[/autoit] [autoit][/autoit] [autoit]
$item1 = GUICtrlCreateMenuItem("Kopieren nach...", $context)
GUICtrlSetOnEvent($item1, "_kopieren")
$item2 = GUICtrlCreateMenuItem("Markierte Titel aus der Liste löschen", $context)
GUICtrlSetOnEvent($item2, "_deselect")
GUISetOnEvent($GUI_EVENT_CLOSE, "_GUIClose")
; GUICtrlSetOnEvent($item2, "_Delete")
GUICtrlSetOnEvent($listview, "List1Click")
_GUICtrlListView_RegisterSortCallBack($listview, True, True) ;sortierfunktion einschaltenFor $i = 2 To $aIn[0] ; bei Index 2 starten, dann ist die erste Zeile weg
[/autoit] [autoit][/autoit] [autoit]
$item1 = GUICtrlCreateListViewItem($aIn[$i], $listview)
NextFor $i = 0 To _GUICtrlListView_GetColumnCount($listview) -1
[/autoit] [autoit][/autoit] [autoit]
_GUICtrlListView_SetColumnWidth($listview, $i, $LVSCW_AUTOSIZE)
NextGUISetState()
[/autoit] [autoit][/autoit] [autoit]While 1
[/autoit] [autoit][/autoit] [autoit]
Sleep(50)
WEndFunc _deselect()
[/autoit] [autoit][/autoit] [autoit]
For $i = 0 To _GUICtrlListView_GetItemCount($listview) -1
_GUICtrlListView_SetItemChecked($listview, $i, 0)
Next
EndFuncFunc _kopieren()
[/autoit] [autoit][/autoit] [autoit]
DirCreate(@ScriptDir & "\auswahlliste")MsgBox(0,"Kopiervorgang startet", "Kopiervorgang startet. Bitte haben Sie ein wenig Geduld.")
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
For $iIndex = 0 To _GUICtrlListView_GetItemCount($listview) ;nacheinander die listenitems aufrufen
If _GUICtrlListView_GetItemChecked($listview, $iIndex) Or _GUICtrlListView_GetItemSelected($listview, $iIndex) Then ;wenn angehakt,dann kopieren
$titel = _GUICtrlListView_GetItem($listview, $iIndex, 1) ;schau mal in die Hilfe....
$pfad = _GUICtrlListView_GetItem($listview, $iIndex,
;schau mal in die Hilfe....
;_arraydisplay($titel)
FileCopy($pfad[3], @ScriptDir & "\auswahlliste\" & $titel[3] & ".mp3")
;MsgBox(0, "Kopieren: " & $titel[3], $pfad[3])
EndIf
Next
MsgBox(0,"Kopiervorgang erfolgreich", "Kopiervorgang erfolgreich.")
EndFunc ;==>_kopierenFunc List1Click()
[/autoit] [autoit][/autoit] [autoit]
_GUICtrlListView_SortItems(GUICtrlGetHandle($listview), GUICtrlGetState($listview))
EndFunc ;==>List1ClickFunc _bearbeiten()
[/autoit] [autoit][/autoit] [autoit]
_GUICtrlListView_BeginUpdate($listview)
_GUICtrlListView_EndUpdate($listview)
EndFunc ;==>_bearbeiten;deaktiviert
[/autoit] [autoit][/autoit] [autoit]
#cs
Func _delete() ;zeilen in der liste löschen
If MsgBox(262144 + 32 + 4, "", "Markierte bzw. angehakte Zeilen aus der Liste löschen? ") = 6 Then
_GUICtrlListView_DeleteItemsSelected(GUICtrlGetHandle($listview))
EndIf
EndFunc ;==>_delete
#ceFunc _GUIClose()
[/autoit]
_GUICtrlListView_UnRegisterSortCallBack($listview)
Exit
EndFunc ;==>_GUIClose -
Wie soll die Ausgabe sein? 2D-Array?
Wieso Jobbörse? Willst du dafür bezahlen? Wieviel?Und ja, es geht.
-
Ich denke nicht, dass das bei uns hier legal ist.