Leaderboard
Popular Content
Showing content with the highest reputation on 03/25/2021 in all areas
-
ISN AutoIt Studio
musicstashall and 2 others reacted to ISI360 for a topic
Hi folks! It´s update time again! ISN AutoIt Studio version 1.12 is now online! Like everywhere else, the Corona crisis has made my past ISN development quite a mess. But now I have finally put together a final version. The special highlight of this version is the final replacement of AutoIt *.exe files in the ISN package. Everything is now changed to *.a3x files (except the AutoIt_Studio.exe...which is now "only" a launcher for the actual *.a3x and is NOT created with AutoIt anymore (PureBasic). So the "virus scanner and false positive" topic should be now finally solved! (hopefully) Have fun with it, and as always: Feedback is welcome! 😎 Here the detailed changelog (translated by google): -> ISN AutoIt Studio: <- ----------------------------------- [Bug fixes] - Various bug fixes - Fixed a bug that caused the ISN to crash without warning or error message. - Fixed graphic bugs (gray area) in the script tree. - The logos of the plugins were often displayed in the wrong size in the program settings. This is now fixed. - Error when renaming shortcuts (* .lnk) files in the project tree has been fixed. - Resize bug with undocked plugins fixed. - Resize bug with Aero Snap fixed. - Folders that have already been opened / expanded in the project tree are no longer closed sporadically as soon as the view is updated. - Fixed a bug where the project tree stopped registering entries with the mouse after several hours. - Fixed flickering of the menu bar when opening a new file. [Improvements] - Due to the persistent virus reports (false positives) from various AV scanners, the following changes are introduced in this version: The most important components of the ISN AutoIt Studio are no longer delivered as * .exe, but as * .a3x. The ISN AutoIt Studio now contains a separate copy of "AutoIt3.exe" in the "\ Data" folder, which is used to start the ISN Studio itself and various program components. There will still be an "Autoit_Studio.exe" in the program directory, but this is NO longer written in AutoIt, but with PureBasic. (False positives shouldn't be an issue here) The new "Autoit_Studio.exe" only serves as a "launcher" for Autoit_Studio.a3x and AutoIt3.exe. With all of these changes, I hope that the false positive issue will be dealt with for a long time to come. - Import & export of macros has been improved. It is now possible to export individual macros. - Reduced "flickering" when changing the window size of the ISN AutoIt Studios main window. - The "Macros" window has been revised. - Files & folders with a dot "." are now hidden from the project tree. (Known from the Linux world) - When renaming files in the project tree, only the file name (without extension) is now selected. Prevents accidental removal of the file extension. - Improved performance with large scripts. - The window for ISN variables has been revised. Variables from the selection can now be inserted in any input control via drag and drop. - The root folder of the currently open project is now symbolized in the project tree with a "Home" icon. (Known from the first ISN versions) - The function "Jump to function (CTRL + J)" now searches not only the currently opened script, but all files that were added as an include by the main file. [New Features] - Added Polish translation (thx to MasterKnack) - There are two new entries in the context menu of the project tree: "Open new CMD / PowerShell window here" - There is now a new button in the "Create new macro" window with which the macro can be tested (executed) directly. - The number of macro slots has been increased from 7 to 10. (Info: The 3 new slots must be added manually to the toolbar in the program settings!) - Global macros: In addition to the previous project-related macros, there are now cross-project (global) macros that apply to all ISN AutoIt Studio projects. These global projects are saved directly in the config.ini of the ISN AutoIt Studio. Global macros are always executed first in the sequence, then the project-related ones. - The limitation of "One macro per macro slot" has been removed. Several macros can now be assigned to one macro slot. These are then carried out in sequence. - In the project tree there is now a "Favorites" area at the top. Each file in the project tree can now be marked "as a favorite" in the context menu and can then be found as a link in this new area. The favorites area behaves like a normal folder. You can also create subfolders etc. in it. The favorites are created in a subfolder of the project with the name ".Favorites". If you wish, this favorite area can be deactivated again in the program settings. - Two new ISN variables added: %ProjecttreeSelectedFile_Name% & %ProjecttreeSelectedFile_Path%. These contain the file name or the file path of the file currently selected in the project tree. (Perfect for macros in the context menu of the project tree!) -> ISN Form Studio 2: <- ----------------------------------- [Bug fixes] - Various bug fixes - Fixed a bug with disappearing "Rich Edit" controls in the GUI. - Made some performance improvements. -> ISN Command Line Tool: <- ----------------------------------- Note: The "ISN AutoIt Studio Command Line Tool" is available for download separately on my homepage from ISN AutoIt Studio Version 1.12! (So it is no longer included in the ISN installation!) The reason for this is that this tool unfortunately has to remain an .exe file (i.e. it cannot be converted into a * .a3x file). The .exe would again increase the risk of a "false positive" alarm from various AV scanners and has therefore been removed from the ISN package. [New Features] - New parameters for the ISN Command Line Tool have been added. More on this in the help. - The command line tool can now output the STDOUT stream of the ISN when compiling or testing a project. - The Command Line Tool now waits for certain commands until they are finished. (e.g. open project)3 points -
How to avoid window activation ?
dmob and one other reacted to argumentum for a topic
Question 5: done, next Edit: the way I used WinListChildren() is guess like. Here is a better one using GetShellEmbedding() : #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> #include <WindowsConstants.au3> #include <WinAPISysWin.au3> Example() ;;; https://www.autoitscript.com/forum/topic/205490-how-to-avoid-window-activation/?tab=comments#comment-1478463 ; Simple example: Embedding an Internet Explorer Object inside an AutoIt GUI Func Example() ; This particular object is declared as ObjEvent() need to stored the Object, #forceref to avoid Au3Check warning. Local $oErrorHandler = ObjEvent("AutoIt.Error", _ErrFunc) #forceref $oErrorHandler Local $idButton_Back, $idButton_Forward Local $idButton_Home, $idButton_Stop, $iMsg Local $oIE = ObjCreate("Shell.Explorer.2") ; Create a simple GUI for our output Local $hwnd = GUICreate("Embedded Web control Test", 640, 580, (@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2, BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS, $WS_CLIPCHILDREN)) GUICtrlCreateObj($oIE, 10, 40, 600, 360) GUICtrlSetResizing(-1, $GUI_DOCKAUTO) $idButton_Back = GUICtrlCreateButton("Back", 10, 420, 100, 30) $idButton_Forward = GUICtrlCreateButton("Forward", 120, 420, 100, 30) $idButton_Home = GUICtrlCreateButton("AutoIt Home", 230, 420, 100, 30) $idButton_Stop = GUICtrlCreateButton("Stop", 330, 420, 100, 30) GUISetState(@SW_SHOW) ;Show GUI ;~ MsgBox($MB_OK + $MB_TOPMOST + $MB_ICONINFORMATION, "Information #" & @ScriptLineNumber, "Active window is: " & WinGetTitle('[ACTIVE]')) ;~ WinActivate("[REGEXPTITLE:(?i)(.*SciTE.*)]") ;~ MsgBox($MB_OK + $MB_TOPMOST + $MB_ICONINFORMATION, "Information #" & @ScriptLineNumber, "Active window is: " & WinGetTitle('[ACTIVE]')) ;~ WinSetTitle($hwnd,'','NEW TITLE') ;~ MsgBox($MB_OK + $MB_TOPMOST + $MB_ICONINFORMATION, "Information #" & @ScriptLineNumber, "Active window is: " & WinGetTitle('[ACTIVE]')) ;~ WinActivate("[REGEXPTITLE:(?i)(.*SciTE.*)]") ;~ MsgBox($MB_OK + $MB_TOPMOST + $MB_ICONINFORMATION, "Information #" & @ScriptLineNumber, "Active window is: " & WinGetTitle('[ACTIVE]')) $oIE.navigate("http://google.com") ;~ MsgBox($MB_OK + $MB_TOPMOST + $MB_ICONINFORMATION, "Information #" & @ScriptLineNumber, "Active window is: " & WinGetTitle('[ACTIVE]')) ;;; ========================================================== Local $hIE = GetShellEmbedding($hWnd) Sleep(1000) WinSetState($hIE, "", @SW_HIDE) Sleep(1000) WinSetState($hIE, "", @SW_SHOW) ;;; ========================================================== ; Loop until the user exits. While 1 $iMsg = GUIGetMsg() Select Case $iMsg = $GUI_EVENT_CLOSE ExitLoop Case $iMsg = $idButton_Home ;~ $oIE.navigate("http://www.autoitscript.com") Case $iMsg = $idButton_Back $oIE.GoBack Case $iMsg = $idButton_Forward $oIE.GoForward Case $iMsg = $idButton_Stop $oIE.Stop EndSelect WEnd GUIDelete() EndFunc ;==>Example ; User's COM error function. Will be called if COM error occurs Func _ErrFunc($oError) ; Do anything here. ConsoleWrite(@ScriptName & " (" & $oError.scriptline & ") : ==> COM Error intercepted !" & @CRLF & _ @TAB & "err.number is: " & @TAB & @TAB & "0x" & Hex($oError.number) & @CRLF & _ @TAB & "err.windescription:" & @TAB & $oError.windescription & @CRLF & _ @TAB & "err.description is: " & @TAB & $oError.description & @CRLF & _ @TAB & "err.source is: " & @TAB & @TAB & $oError.source & @CRLF & _ @TAB & "err.helpfile is: " & @TAB & $oError.helpfile & @CRLF & _ @TAB & "err.helpcontext is: " & @TAB & $oError.helpcontext & @CRLF & _ @TAB & "err.lastdllerror is: " & @TAB & $oError.lastdllerror & @CRLF & _ @TAB & "err.scriptline is: " & @TAB & $oError.scriptline & @CRLF & _ @TAB & "err.retcode is: " & @TAB & "0x" & Hex($oError.retcode) & @CRLF & @CRLF) EndFunc ;==>_ErrFunc Func GetShellEmbedding($hWnd) Local $hChild = _WinAPI_GetWindow($hWnd, $GW_CHILD) While $hChild If _WinAPI_GetClassName($hChild) = "Shell Embedding" Then Return $hChild $hChild = _WinAPI_GetWindow($hChild, $GW_HWNDNEXT) WEnd Return 0 EndFunc2 points -
Could you please stop opening all these topics on SciTE/SciTE-lite just because you are wondering things and not seem to be able to do a little research yourself first? I am using the Standard SciTE SC1 build for SciTE-lite so try figuring things out yourself and just open one topic with your questions when you really can't find it.1 point
-
How to avoid window activation ?
argumentum reacted to mLipok for a topic
In conclusion, after this post below I started working on improving this UDF Hence so many new questions.1 point -
Set author in excel
FrancescoDiMuro reacted to TheXman for a topic
The BuiltinDocumentProperties collection itself is read only. However, its properties can be modified and saved for any given workbook. Meaning, if/when you open a new workbook, the values of the BuiltInDocumentProperties collection will be as they originally were. Here's an example of how to modify the Author property for a workbook: #include <Excel.au3> example() Func example() Local $oExcel, $oWorkbook $oExcel = _Excel_Open() $oWorkbook = _Excel_BookNew($oExcel) With $oWorkbook ;Display current author, modify it, display it after being modified ConsoleWrite("Author (Before) = " & .BuiltInDocumentProperties.Item("Author").Value & @CRLF) .BuiltinDocumentProperties.Item("Author").Value = "New Author" ConsoleWrite("Author (After) = " & .BuiltInDocumentProperties.Item("Author").Value & @CRLF) EndWith ;~ _Excel_Close($oExcel) EndFunc Console: Author (Before) = TheXman Author (After) = New Author1 point -
How to avoid window activation ?
argumentum reacted to mLipok for a topic
This is quite possible. Of course, such a state of affairs is even good.1 point -
How to avoid window activation ?
mLipok reacted to argumentum for a topic
The client ( aka canvas ) is locked, not the window form. I hope this answers the 6th question I also hope to be right1 point -
Hello. I think is not an issue. It's maybe something related to Windows I tested using SetWindowText API and It gets activated too even from an external process. Saludos1 point
-
How to avoid window activation ?
mLipok reacted to argumentum for a topic
the control is not part of your GUI, is something you're "parenting"/including, you have no control over it ( the $oIE ), so you SW_LOCK your GUI not the other GUI running in it's own ( $oIE ) ( my 2 cents. )1 point -
Understand.... Hence my comments. ... and I honestly believe you should do the effort of learning and not ask c# questions in our AutoIt3 forum, or else hire a professional programmer. This is an AutoIt3 scripting forum, and yes, we do not mind questions about the AutoIt3x module, but that is something different than asking us to code the C# for you. Just my humble opinion, but when others feel they need to do this for you than by all means....1 point
-
@Triki Unfortunately, I do not have C#. I did have programmed in C# in the far past, but I do not intend to restart doing so now. Sorry. If you need further help in AutoIt, I will be glad to give a hand.1 point
-
1 point
-
Put the values into an array and then use one or other of the the array manipulation functions such as _ArrayAdd, _ArrayConcatenate, _ArrayDelete, _ArrayInsert, _ArrayPop, _ArrayPush. Look for examples inthe help. https://www.autoitscript.com/autoit3/docs/libfunctions/_ArrayAdd.htm1 point
-
Passing argument to a running AutoIT EXE - (Moved)
OhBobSaget reacted to Melba23 for a topic
Moved to the appropriate forum, as the Developer General Discussion forum very clearly states: Moderation Team1 point -
Nice work! Thanks~ AlmarM1 point
-
Click event for a listbox??
hudsonhock reacted to Melba23 for a topic
Kidney, I would use a double-click for this - ListBoxes and ListViews have a nasty habit of eating single-clicks. You can do something like this to action the double-click: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GuiListBox.au3> $hGUI = GUICreate("Test", 500, 500) $cList_1 = GUICtrlCreateList("", 10, 10, 200, 200) GUICtrlSetData($cList_1, "1|2|3|4") $cList_2 = GUICtrlCreateList("", 260, 10, 200, 200) GUISetState() GUIRegisterMsg($WM_COMMAND, "WM_COMMAND") While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func WM_COMMAND($hWnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg, $lParam $iIDFrom = BitAND($wParam, 0xFFFF) ; Low Word $iCode = BitShift($wParam, 16) ; Hi Word Switch $iCode Case $LBN_DBLCLK ; Sent when the user double-clicks a string in a list box Switch $iIDFrom Case $cList_1 $iIndex = _GUICtrlListBox_GetCaretIndex($cList_1) $sText = _GUICtrlListBox_GetText($cList_1, $iIndex) _GUICtrlListBox_DeleteString($cList_1, $iIndex) _GUICtrlListBox_AddString($cList_2, $sText) EndSwitch EndSwitch EndFunc All clear? Please ask if not. M231 point -
Maybe it's not the best solution, but I got it working with _GUICtrlListBox_ItemFromPoint() #include <GUIConstantsEx.au3> #include <Misc.au3> #include <GUIListBox.au3> $hGUI = GUICreate("Test", 500, 500) Global $hListX = 10, $hListY = 10 $hList = GUICtrlCreateList("", $hListX, $hListY, 480, 300) GUICtrlSetData($hList, "Line 1|Line 2|Line 3") $hListContext = GUICtrlCreateContextMenu($hList) $hListContextItem = GUICtrlCreateMenuItem("Menu item", $hListContext) $hListContextUnselect = GUICtrlCreateMenuItem("Unselect me", $hListContext) GUICtrlCreateEdit("some text", 10, 310, 480, 180) $WM_CONTEXTMENU = 123 GUIRegisterMsg($WM_CONTEXTMENU, "_WM_CONTEXTMENU") ;display context menu only when list is in focus and selected an item GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $hListContextItem MsgBox(0,'',GUICtrlRead($hList, getSelectedItem())) Case $hListContextUnselect _GUICtrlListBox_SetCurSel($hList, -1) EndSwitch WEnd Func getSelectedItem() Local $index = -1 If (_WinAPI_GetFocus() = GUICtrlGetHandle($hList)) And GUICtrlRead($hList) Then $index = _GUICtrlListBox_GetCurSel($hList) EndIf Return $index EndFunc ;==>getSelectedFile Func _WM_CONTEXTMENU($hwnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg, $wParam, $lParam If $wParam <> GUICtrlGetHandle($hList) Then Return $GUI_RUNDEFMSG Local $cursor = GUIGetCursorInfo($hGUI) Local $index = _GUICtrlListBox_ItemFromPoint($hList, $cursor[0] - $hListX - 2, $cursor[1] - $hListY - 2) If $index == -1 Then Return 0 _GUICtrlListBox_SetCurSel($hList, $index) Return $GUI_RUNDEFMSG EndFunc ;==>_WM_CONTEXTMENU Maybe there is a better way?1 point
-
List all child controls of a given window
mLipok reacted to Authenticity for a topic
#include <Array.au3> #include <Constants.au3> #include <WinAPI.au3> Global $avChildren Run('calc.exe') WinWaitActive('Calculator') $hWnd = WinGetHandle('Calculator') WinListChildren($hWnd, $avChildren) _ArrayDisplay($avChildren) Exit Func WinListChildren($hWnd, ByRef $avArr) If UBound($avArr, 0) <> 2 Then Local $avTmp[10][2] = [[0]] $avArr = $avTmp EndIf Local $hChild = _WinAPI_GetWindow($hWnd, $GW_CHILD) While $hChild If $avArr[0][0]+1 > UBound($avArr, 1)-1 Then ReDim $avArr[$avArr[0][0]+10][2] $avArr[$avArr[0][0]+1][0] = $hChild $avArr[$avArr[0][0]+1][1] = _WinAPI_GetWindowText($hChild) $avArr[0][0] += 1 WinListChildren($hChild, $avArr) $hChild = _WinAPI_GetWindow($hChild, $GW_HWNDNEXT) WEnd ReDim $avArr[$avArr[0][0]+1][2] EndFunc Don't list all child controls of me1 point -
Rotate a Label &/or Input
hudsonhock reacted to BugFix for a topic
Is it, what you want: #include <WinApi.au3> #include <StructureConstants.au3> #include <WindowsConstants.au3> _Main() Func _Main () Local $hGUI, $tRect, $rotate, $RotateMe, $rFont, $hDC ; Create GUI $hGUI = GUICreate ('', 500, 400) GUISetState () ; Updates the specified rectangle or region in a window's client area _WinAPI_RedrawWindow ($hGUI) ; Create RECT-structure, fill data $tRect = DllStructCreate ($tagRECT) DllStructSetData ($tRect, 'Left', 180) DllStructSetData ($tRect, 'Top', 390) ; Set rotation $rotate = 90 *10 ; angle *10 ; Create structure for rotate text, fill data $RotateMe = DllStructCreate ($tagLOGFONT) DllStructSetData ($RotateMe, 'Escapement', $rotate) DllStructSetData ($RotateMe, 'Height', (60 * -20)/_WinAPI_TwipsPerPixelY()) DllStructSetData ($RotateMe, 'Weight', 800) DllStructSetData ($RotateMe, 'Italic', True) ;~ ;DllStructSetData ($RotateMe, 'Underline', True) ;~ ;DllStructSetData ($RotateMe, 'StrikeOut', True) DllStructSetData ($RotateMe, 'FaceName', 'Courier New') ; Creates a logical font that has specific characteristics $rFont = _WinAPI_CreateFontIndirect ($RotateMe) ; Retrieves a handle of a display device context for the client area a window $hDC = _WinAPI_GetDC ($hGUI) ; Set text- and back color _WinAPI_SetTextColor ($hDC, 0x0000FF) _WinAPI_SetBkColor ($hDC, 0xFFFF00) ; Selects an object into the specified device context _WinAPI_SelectObject ($hdc, $rFont) ; Draws formatted text in the specified rectangle _WinAPI_DrawText ($hDC, ' Hallo! ', $tRect, BitOR ($DT_NOCLIP,$DT_NOPREFIX)) ; Loop until user exits Do Until GUIGetMsg () = -3 ; Clean up resources _WinAPI_ReleaseDC ($hGUI, $hDC) EndFunc ;==>_Main1 point