Leaderboard
Popular Content
Showing content with the highest reputation on 08/10/2022 in all areas
-
To use DllCall() correctly, be aware of the following: The AutoIt DllCall() function can only be used to execute functions in dll-files implemented in unmanaged languages such as C, C++ and Pascal. The DllCall() function cannot be used to execute functions in .NET assembly dll-files implemented in managed languages such as C#, F# or VB.NET. Note that this isn't an AutoIt limitation or a limitation in the DllCall() function. It's a very general limitation when trying to mix any unmanaged programming language with managed code. AutoIt is an unmanaged programming language. Fortunately, there are methods to integrate unmanaged and managed code. This also applies to AutoIt and C# code. With an AutoIt background, the DotNetAll.au3 UDF as implemented in Using C# and VB.NET Code is by far the easiest way to execute C# (or VB.NET) code directly within an AutoIt script. With this technique you have eg. no need for a C# (or VB.NET) IDE, but can handle all code in SciTE. See bottom of this post for a complete list of the benefits of the technique. But this method works best if the C# (or VB.NET) code only depends on internal .NET assembly dll-files or relatively simple external .NET assembly dll-files. In your case it seems to be a slightly more advanced external .NET assembly dll-file. To be sure to get the code working in AutoIt, use the technique briefly demonstrated in this post. This method requires an IDE to compile the C# code into a .NET assembly dll-file and it requires the dll-file to be registered with RegAsm.exe. Why is more C# code needed when a .NET assembly dll file already exists and contains the actual UploadZipFile() method? In your case with the UploadZipFile() method, it is necessary to add a bit more C# code to use the method in AutoIt. The problem is that UploadZipFile() is a static method, and a static method cannot be executed in AutoIt. In the C# code, you must include the .NET assembly dll file and you must write a small wrapper method that works in AutoIt. The wrapper method must be a simple public method as shown in the example in the link and the method must of course call the static UploadZipFile() method. Depending on your experience with AutoIt objects and C# code, getting the code to work isn't necessarily a completely trivial task.1 point
-
While ControlCommand("Title","","Button1","IsEnabled","") = 0 Sleep(250) Wend1 point
-
WebDriver UDF - Help & Support (III)
seadoggie01 reacted to Jos for a topic
*click* to avoid posts of people that don't read, which I know hardly happens, but still.......1 point -
Version 1.5.0.1
945 downloads
The F1 key in SciTE displays the documentation for the word on which the cursor is located. Up to now this was only available for AutoIt. But times change and we change with them Now with Advanced.Help ANY CHM help file (Compressed HTML Help) can be called with the F1 key. The only prerequisite: All function names have to start with the same identifier (like _AD_, _OL_ etc.). This tool, created by BugFix from the german forum and the help of Musashi, allows custom CHM help files to be included in SciTE. The existing help key is used to call either the AutoIt help or the corresponding custom help. Depending on which keyword the cursor is currently on. For unknown keywords the AutoIt help is called. For AutoIt a separate window is opened and for the user-defined UDFs another window is opened, so you can work with both helps at the same time. The ZIP file contains an installation guide in German (Install_Deutsch.txt) and English (Install_English.txt) in which the installation and configuration is described in detail. Most CHM help files come with UDFs you can download from this forum section (AD, OutlookEX, TaskScheduler). In addition we have added the preliminary release of the WebDriver help file. The most current CHM help file is now only distributed with the WebDriver UDF. BTW: If you like this UDF please click the "I like this" button. This tells me where to next put my development effort Known Bugs: (last changed: 2022-07-20) None1 point -
Hello I'm using isn autoit studio for a long time and tried to add some plugins, but the existing SDK is very limited So I modified the original code I added linking external files with the project I know that the file name appears in the project tree, but the file is not found in the project folder ADD Item in Context Menu for add new Linker Global $TreeviewContextMenu_Item_Linker = _GUICtrlCreateODMenuItem("Linker", $TreeviewContextMenu_Item8, $smallIconsdll, 998) ;Projektbaum aktualisieren add Event in _InputCheck Case $TreeviewContextMenu_Item_Linker _Linker() add _Linker Function for add New Linker and update .isn file #Region ; DevMode Func _Linker() If $Offenes_Projekt = "" Then Return -1 If Not IsHWnd($Current_TVExplorer_TreeView) Then Return -1 Local $Treeview = $Current_TVExplorer_TreeView If _GUICtrlTreeView_GetSelection($Treeview) = 0 Then Return $FileSet = FileOpenDialog("Setect Linker",'','Autoit File(*.au3;)|All File(*.*)') If FileExists($FileSet) Then Dim $szDrive, $szDir, $szFName, $szExt _PathSplit($FileSet, $szDrive, $szDir, $szFName, $szExt) $LinkerName = InputBox("Add New Linker","Plese enter Linker Name",$szFName&$szExt) If $LinkerName = "" Then Return _GUICtrlTreeView_AddChild($hWndTreeview, _GUICtrlTreeView_GetFirstItem($hWndTreeview),'=>'&$LinkerName) $NewLinker = $FileSet&'%'&$LinkerName $OldLinkers = IniRead($Pfad_zur_Project_ISN, "ISNPROJECT_TODOLISTDATA", "Linker", "") IniWrite($Pfad_zur_Project_ISN, "ISNPROJECT_TODOLISTDATA", "Linker",$OldLinkers&'|'&$NewLinker) EndIf Sleep(250) $Projektbaum_ist_bereit = 1 EndFunc ;==>_Erstelle_kopie_von_markierter_datei #EndRegion add _LinkerOpen for open file in Editor Func _LinkerOpen($LinkerName) $Linkes = IniRead($Pfad_zur_Project_ISN, "ISNPROJECT_TODOLISTDATA", "Linker", "") $sLinker = StringSplit($Linkes,'|') For $p = 1 To $sLinker[0] If $sLinker[$p] = "" Then ContinueLoop $fLinker = StringSplit($sLinker[$p],'%') If $fLinker[0] = 2 And $LinkerName = $fLinker[2] Then Try_to_opten_file($fLinker[1]) EndIf Next EndFunc add Load Linker Func _Load_Project($Foldername) ....... $RDC_Main_Thread = _RDC_Create($Offenes_Projekt, 1, BitOR($FILE_NOTIFY_CHANGE_FILE_NAME, $FILE_NOTIFY_CHANGE_DIR_NAME), 0, $Studiofenster) $RDC_UDFs_Thread = _RDC_Create(_ISN_Variablen_aufloesen($UDFs_Folder), 1, BitOR($FILE_NOTIFY_CHANGE_FILE_NAME, $FILE_NOTIFY_CHANGE_DIR_NAME), 0, $Studiofenster) _Reload_Ruleslots() _Aktualisiere_oder_erstelle_Projektbaum($Offenes_Projekt) _GUICtrlTVExplorer_Expand($hWndTreeview) #Region Load Linker DevMode $Linkes = IniRead($Pfad_zur_Project_ISN, "ISNPROJECT_TODOLISTDATA", "Linker", "") $sLinker = StringSplit($Linkes,'|') For $p = 1 To $sLinker[0] If $sLinker[$p] = "" Then ContinueLoop $fLinker = StringSplit($sLinker[$p],'%') If $fLinker[0] = 2 Then _GUICtrlTreeView_AddChild($hWndTreeview, _GUICtrlTreeView_GetFirstItem($hWndTreeview),'=>'&$fLinker[2]) EndIf Next #EndRegion ;Set focus to the first item in the treeview ...... EndFunc ;==>_Load_Project Func _Update_Treeview() ...... #Region Load Linker DevMode $Linkes = IniRead($Pfad_zur_Project_ISN, "ISNPROJECT_TODOLISTDATA", "Linker", "") $sLinker = StringSplit($Linkes,'|') For $p = 1 To $sLinker[0] If $sLinker[$p] = "" Then ContinueLoop $fLinker = StringSplit($sLinker[$p],'%') If $fLinker[0] = 2 Then _GUICtrlTreeView_AddChild($hWndTreeview, _GUICtrlTreeView_GetFirstItem($hWndTreeview),'=>'&$fLinker[2]) EndIf Next #EndRegion EndFunc ;==>_Update_Treeview Also I needed to add some modifications because by clicking on the file in the project tree the item . is deleted Edit File ISN_Studio_WindowMessages.au3 , Function _ISN_WM_NOTIFY_TVExplorer Case -3 ; NM_DBLCLK $Current_TVExplorer_TreeView = $hTV ;~ If $tvData[$Index][28] Then ;~ ExitLoop ;~ EndIf $tPOINT = _WinAPI_GetMousePos(1, $hTV) $tTVHTI = _GUICtrlTreeView_HitTestEx($hTV, DllStructGetData($tPOINT, 1), DllStructGetData($tPOINT, 2)) $hItem = DllStructGetData($tTVHTI, 'Item') If BitAND(DllStructGetData($tTVHTI, 'Flags'), $TVHT_ONITEM) Then $text = _GUICtrlTreeView_GetText($Current_TVExplorer_TreeView, $hItem ) If StringLeft($text,2) = "=>" Then Return _LinkerOpen(StringTrimLeft($text,2)) ; DevMode $path = _TV_GetPath($Index, $hItem) If Not _WinAPI_PathIsDirectory($path) Then _TV_Send(6, $Index, $hItem) EndIf EndIf Edit File ISN_UDF_TVExplorer.au3 , Function _TV_Send Func _TV_Send($iDummy, $iIndex, $hItem, $fDirect = 0, $lParam = 0) IF BitAND($ISNDebugConsole_SpecialLogs, $ISNDebugConsole_SpecialLogs_TVExplorer) then _Write_ISN_Debug_Console("TVExplorer try to send "&$iDummy&" to index "&$iIndex&" and hItem "&$hItem , $ISN_Debug_Console_Errorlevel_Info) _Write_ISN_Debug_Console("DummyControl Handle: "&$tvData[$iIndex][$iDummy], $ISN_Debug_Console_Errorlevel_Info) Endif Local $wParam = _WinAPI_MakeLong($iDummy, $iIndex) If $hItem <> -1 Then $tvData[$iIndex][$iDummy + 17] = $hItem EndIf If $fDirect Then IF BitAND($ISNDebugConsole_SpecialLogs, $ISNDebugConsole_SpecialLogs_TVExplorer) then _Write_ISN_Debug_Console("TVExplorer try _TV_Dummy with wparam "&$wParam&" and lparam "&$lParam , $ISN_Debug_Console_Errorlevel_Info) _TV_Dummy($wParam, $lParam) Else IF BitAND($ISNDebugConsole_SpecialLogs, $ISNDebugConsole_SpecialLogs_TVExplorer) then _Write_ISN_Debug_Console("TVExplorer try GUICtrlSendToDummy with handle "&$tvData[$iIndex][$iDummy]&" and wparam "&$wParam , $ISN_Debug_Console_Errorlevel_Info) If StringLeft(_GUICtrlTreeView_GetText($Current_TVExplorer_TreeView, $hItem ),2) = "=>" Then Return 1 ; DevMode If Not GUICtrlSendToDummy($tvData[$iIndex][$iDummy], $wParam) Then IF BitAND($ISNDebugConsole_SpecialLogs, $ISNDebugConsole_SpecialLogs_TVExplorer) then _Write_ISN_Debug_Console("TVExplorer _TV_Send STOPPED at GUICtrlSendToDummy! Let´s ReCreate the DummyControls..." , $ISN_Debug_Console_Errorlevel_Warning) _ISN_ReCreateTVExplorerDummyControls($iIndex) If Not GUICtrlSendToDummy($tvData[$iIndex][$iDummy], $wParam) Then IF BitAND($ISNDebugConsole_SpecialLogs, $ISNDebugConsole_SpecialLogs_TVExplorer) then _Write_ISN_Debug_Console("TVExplorer _TV_Send STOPPED again at GUICtrlSendToDummy! ReCreate failed!" , $ISN_Debug_Console_Errorlevel_Critical) Return 0 Endif EndIf EndIf Return 1 EndFunc ;==>_TV_Send Please ISI360 add this feature to the official software Also, if possible, add the project to GitHub so that we can help it develop the program1 point
-
Yes, it is simple: #include <GDIPlus.au3> _GDIPlus_Startup() Global $hBitmap = _GDIPlus_BitmapCreateFromFile(@ScriptDir & "\image.jpg") ;load bitmap as GDI+ bitmap Global $hHBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBitmap) ;convert it to a GDI bitmap _GDIPlus_BitmapDispose($hBitmap) Global Const $STM_SETIMAGE = 0x0172, $IMAGE_BITMAP = 0 $kiosk = GUICreate("", @DesktopWidth, @DesktopHeight) GuiSetBkColor("0x000000") ; Background image Global $iPic = GUICtrlCreatePic("", 0, 0, 640, 480) Global $hB = GUICtrlSendMsg($iPic, $STM_SETIMAGE, $IMAGE_BITMAP, $hHBITMAP) ;copy GDI bitmap to picture control If $hB Then _WinAPI_DeleteObject($hB) ; --- Display the Coded Form --- ; GUISetState(@SW_SHOW) Sleep(4000) _WinAPI_DeleteObject($hHBitmap) ;release bitmap _GDIPlus_Shutdown() GUIDelete() Exit Br, UEZ1 point