Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/06/2016 in all areas

  1. "The why" I've been working over 15 years in the IT industry and have realised that the best way of streamlining operations and support is by combining the concept of selling services (instead of hours) along with a tool built for managing those services. For the past 10 years i've been working with some of the leading providers of MSP-tools. The prize set on these comercial tools is quite high and there are usually few licence models to choose from. A smaller it-company will find the cost hard to motivate and in turn have dificulties converting its busines model in order to make more money, classic catch 22 "The how" During the years, i've gathered the pros and cons of these tools, dissected their core and realised there is no magic or rocket science going on. There is however a whole lot of scripting used and that's why i feel AutoIT would be a great foundation for a new project. So, i've decided to compile my years of experiance and create a tool for remote management and monitoring of machines over WAN. Instead of monetizing it and try to compete with the big companies i felt it more efficiant to make it open source and hope for community interest and development. "The what" The following features are under development, some arn't started, some are finished. Check the changelog for more info. Base components - Agent running as service - Central server with MySQL (hub engine) - Management client (AutoitGUI/WebGUI) Main features - Remote execution of shell commands as system or specific user - File transfer from/to agent - Live monitoring of system resources Consequential features (based on main features) - Hardware/software inventory - Software deployment/updating - Patch management - Antivirus management - OS deployment - Disaster recovery - Hardware/software/network monitoring - Wake on LAN - Reporting - Remote registry, event viewer, task manager - Scripting (obviously) Additional features (stand-alone modules) - Remote control - Servicedesk (based on ITIL) - AD-integration Security - Secure communication with SSL and rotating key for every session. - SHA256 encryption. Remmanaut network overview My knowledge of AutoIT is average but i'm novice when it comes to programing structure for collaboration, so if you're willing to help me out in making the project easy to share, i'd be very thankfull. Unfortunatly i'm no php-guru so i'll be concentrating on the AutoitGUI until the agent and hub engine reaches an adequate version. If you feel that this tool could benefit you in any way or just want to join the project for the fun of development, don't hesitate to post constructive feedback or hit me a PM. Code optimisation to do: Download:
    1 point
  2. I'm just a mess, I'm certain I've written the same function dozens of times then just forget about it. There are some snippet examples in examples forum.
    1 point
  3. It's not helpful, because it's not actually doing what you suggested. It's saving the file, then running the temporary file, how is that any different than just saving the file and running it from the editor, other than the fact it's using a temporary file? What I do is use a throwaway file for all my snippet tests, this way I always have a file name to open and insert the code into, and it always saves to the same file. This way I don't have to create a new file every time.
    1 point
  4. alien4u

    Help in AutoIt v3.3.14.2

    But this trick could arise another problems like no proper way to work with @Scriptdir for example and maybe other I dont think or realize right now. Kind Regards Alien.
    1 point
  5. First i would check Jos suggestion. Then see if this is what you are looking: Func Ultimatix() ;Launch Ultimatix Local Const $sFilePath = @MyDocumentsDir & "\AutoIT_Toolbar\Toolbar Items\Apps\Ultimatix.exe" Local $iFileExists = FileExists($sFilePath) If $iFileExists Then Local $LocalFile = FileGetVersion ($sFilePath, "FileVersion") Local $RemoteFile = FileGetVersion("\\1x.2x.1x.8x\htdocs\downloads\software\AutoIT\Ultimatix.exe", "FileVersion") Consolewrite("The file exists" & @CRLF) If $RemoteFile > $LocalFile Then Local $hDownload = InetGet("http://1x.2x.1x.8x/downloads/software/AutoIT/Ultimatix.exe", $sFilePath, $INET_FORCERELOAD, $INET_DOWNLOADBACKGROUND) Do ; Wait for the download to complete by monitoring when the 2nd index value of InetGetInfo returns True. Sleep(250) Until InetGetInfo($hDownload, $INET_DOWNLOADCOMPLETE) InetClose($hDownload) ; Close the handle returned by InetGet. Consolewrite("Remote file is greater than local file" & @CRLF) ShellExecute($sFilePath) Elseif $LocalFile >= $RemoteFile Then ;******** If Local File is greater or EQUAL RemoteFile just execute it Consolewrite("local file is greater than remote file" & @CRLF) ShellExecute($sFilePath) EndIf Else Local $hDownload = InetGet("http://1x.2x.1x.8x/downloads/software/AutoIT/Ultimatix.exe", $sFilePath, $INET_FORCERELOAD, $INET_DOWNLOADBACKGROUND) Do ; Wait for the download to complete by monitoring when the 2nd index value of InetGetInfo returns True. Sleep(250) Until InetGetInfo($hDownload, $INET_DOWNLOADCOMPLETE) InetClose($hDownload) ; Close the handle returned by InetGet. ShellExecute($sFilePath) Consolewrite("I downloaded the file" & @CRLF) EndIf EndFunc ;==>Ultimatix
    1 point
  6. Jos

    Help in AutoIt v3.3.14.2

    Why would you think this? SciTE is a generic editor for multiple languages, so it requires a filename with an extension to determine which Lexer and commands to load. The F1/Help is one of those commands which is language specific, hence you need to save the file first one time to give it the correct file extension. Jos
    1 point
  7. alien4u

    Help in AutoIt v3.3.14.2

    AutoIt Help does not open if you don't save the current SciTE4 you are working on. For example you open SciTE Script Editor and start a new script, write anything and save that script, once is saved then you can open the Help. Look like a "bug" on the Editor. Another way is to manually open it from the Start Menu you will have a Shortcut to: "C:\Program Files (x86)\AutoIt3\AutoIt.chm" This is the Help File. You should look for FileRead() Happy Coding. Kind Regards Alien
    1 point
  8. LarsJ

    how to identify each tab?

    I do not know if there are any easier solutions, but it can be done this way: #include <IE.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <WinAPIConstants.au3> #include <WinAPI.au3> #include "MSAccessibility.au3" Global $aAccObjects[100][3], $iAccObjects = 0 const $navOpenInBackgroundTab = 4096 Global $url = "https://www.binary.com/d/trade.cgi?market=random&time=5t&form_name=risefall&expiry_type=duration&amount_type=payout&H=S0P&currency=USD&underlying_symbol=R_75&amount=100&date_start=now&type=CALL&L=S0P&l=ID" $oIE = _IECreate($url) $oIE.Navigate2($url) $oIE.Navigate2($url, $navOpenInBackgroundTab) $oIE.Navigate2($url, $navOpenInBackgroundTab) Sleep(5000) Local $hChild = 0, $hWindow = WinGetHandle( "[CLASS:IEFrame]", "" ) ; Internet Explorer FindChildWindowByClass( $hWindow, $hChild, "DirectUIHWND" ) ; This function does not depend on a specific IE version ;ConsoleWrite( "$hChild = " & $hChild & @CRLF & @CRLF ) ; Accessible object Local $pChild, $oChild AccessibleObjectFromWindow( $hChild, $OBJID_CLIENT, $tIID_IAccessible, $pChild ) WalkTreeWithAccessibleChildren( $pChild, 0, 2 ) ; The tabs belongs to level 1 (zero based) ;ConsoleWrite( @CRLF ) ; Identifying the tabs by the level makes it independent of the localized string "Tab Row" For $i = 0 To $iAccObjects - 1 If $aAccObjects[$i][2] = 1 Then ExitLoop ; The tabs belongs to level 1 Next Local $iAccFirst = $i, $iAccCount = $iAccObjects - $i - 1 ; Index of first tab, number of tabs Local $hGui = GUICreate( "IE Tabs", 400, 160, -1, 300, -1, $WS_EX_TOPMOST ) Local $idBut1 = GUICtrlCreateButton( $aAccObjects[$iAccFirst][1] & " " & 0, 10, 10, 380, 40 ) For $i = 1 To $iAccCount - 1 GUICtrlCreateButton( $aAccObjects[$iAccFirst+$i][1] & " " & $i, 10, 10+$i*50, 380, 40 ) Next GUISetState() Local $iMsg While 1 $iMsg = GUIGetMsg() Switch $iMsg Case $idBut1 To $idBut1 + $iAccCount - 1 $aAccObjects[$iAccFirst+$iMsg-$idBut1][0].accDoDefaultAction(0) Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd ; Cleanup For $i = 0 To $iAccObjects - 1 $aAccObjects[$i][0] = 0 Next GUIDelete( $hGui ) Exit Func FindChildWindowByClass( $hParent, ByRef $hFound, $sClass ) If Not $hParent Then Return Local $hChild = _WinAPI_GetWindow( $hParent, $GW_CHILD ) While $hChild If _WinAPI_GetClassName( $hChild ) = $sClass Then $hFound = $hChild Return EndIf FindChildWindowByClass( $hChild, $hFound, $sClass ) $hChild = _WinAPI_GetWindow( $hChild, $GW_HWNDNEXT ) WEnd EndFunc Func WalkTreeWithAccessibleChildren( $pAcc, $iLevel, $iLevels = 0 ) If $iLevels And $iLevel = $iLevels Then Return ; Create object Local $oAcc = ObjCreateInterface( $pAcc, $sIID_IAccessible, $dtagIAccessible ) If Not IsObj( $oAcc ) Then Return $oAcc.AddRef() Local $iChildCount, $iReturnCount, $tVarChildren ; Get children If $oAcc.get_accChildCount( $iChildCount ) Or Not $iChildCount Then Return If AccessibleChildren( $pAcc, 0, $iChildCount, $tVarChildren, $iReturnCount ) Then Return ; Indentation Local $sIndent = "" For $i = 0 To $iLevel - 1 $sIndent &= " " Next Local $vt, $oChildObj, $iChildElem, $sName ; For each child For $i = 1 To $iReturnCount ; $tVarChildren is an array of VARIANTs with information about the children $vt = BitAND( DllStructGetData( $tVarChildren, $i, 1 ), 0xFFFF ) If $vt = $VT_DISPATCH Then ; Child object $pChildObj = DllStructGetData( $tVarChildren, $i, 3 ) $aAccObjects[$iAccObjects][0] = ObjCreateInterface( $pChildObj, $sIID_IAccessible, $dtagIAccessible ) If IsObj( $aAccObjects[$iAccObjects][0] ) Then ;PrintObjectInfo( $aAccObjects[$iAccObjects], $CHILDID_SELF, $sIndent ) $aAccObjects[$iAccObjects][0].get_accName( $CHILDID_SELF, $sName ) $aAccObjects[$iAccObjects][1] = $sName $aAccObjects[$iAccObjects][2] = $iLevel $iAccObjects += 1 WalkTreeWithAccessibleChildren( $pChildObj, $iLevel + 1, $iLevels ) EndIf Else ; $vt = $VT_I4 ; Child element $iChildElem = DllStructGetData( $tVarChildren, $i, 3 ) ;PrintObjectInfo( $oAcc, $iChildElem, $sIndent ) EndIf Next EndFunc Func PrintObjectInfo( $oAcc, $iChild, $sIndent ) Local $sName, $iRole, $sRole, $iRoleLen Local $iState, $sState, $iStateLen, $x, $y, $w, $h If $iChild <> $CHILDID_SELF Then _ ConsoleWrite( $sIndent & "$iChildElem = " & $iChild & @CRLF ) $oAcc.get_accName( $iChild, $sName ) ConsoleWrite( $sIndent & "Name = " & $sName & @CRLF ) EndFunc Save as MSAccessibility.au3: #include-once ;#include "CUIAutomation2.au3" ;Global Const $S_OK = 0x00000000 Global Const $S_FALSE = 0x00000001 ;Global Const $E_NOTIMPL = 0x80004001 ;Global Const $E_NOINTERFACE = 0x80004002 ;Global Const $E_FAIL = 0x80004005 Global Const $DISP_E_MEMBERNOTFOUND = 0x80020003 ;Global Const $E_OUTOFMEMORY = 0x8007000E ;Global Const $E_INVALIDARG = 0x80070057 Global Const $VT_EMPTY = 0 Global Const $VT_I4 = 3 Global Const $VT_DISPATCH = 9 ;Global Const $tagVARIANT = "word vt;word r1;word r2;word r3;ptr data; ptr;" If @AutoItX64 Then Global $tagVARIANT = "dword[6];" ; Use this form to be able to build an Else ; array in function AccessibleChildren. Global $tagVARIANT = "dword[4];" EndIf ;Global Const $tIID_IAccessible = CLSIDFromString( $sIID_IAccessible ) ;Global Const $sIID_IServiceProvider = "{6D5140C1-7436-11CE-8034-00AA006009FA}" ;Global Const $tIID_IServiceProvider = CLSIDFromString( $sIID_IServiceProvider ) ;Global Const $dtagIServiceProvider = "QueryService hresult(struct*;struct*;ptr*);" ; ========= MS Active Accessibility constants ========= ; Child ID for the object itself ; (in contrast to simple child elements of the object) Global Const $CHILDID_SELF = 0 ; Navigation constants Global Const $NAVDIR_MIN = 0 Global Const $NAVDIR_UP = 0x1 Global Const $NAVDIR_DOWN = 0x2 Global Const $NAVDIR_LEFT = 0x3 Global Const $NAVDIR_RIGHT = 0x4 Global Const $NAVDIR_NEXT = 0x5 Global Const $NAVDIR_PREVIOUS = 0x6 Global Const $NAVDIR_FIRSTCHILD = 0x7 Global Const $NAVDIR_LASTCHILD = 0x8 Global Const $NAVDIR_MAX = 0x9 ; Selection flags Global Const $SELFLAG_NONE = 0 Global Const $SELFLAG_TAKEFOCUS = 0x1 Global Const $SELFLAG_TAKESELECTION = 0x2 Global Const $SELFLAG_EXTENDSELECTION = 0x4 Global Const $SELFLAG_ADDSELECTION = 0x8 Global Const $SELFLAG_REMOVESELECTION = 0x10 Global Const $SELFLAG_VALID = 0x1f ; Object identifiers ;Global Const $OBJID_WINDOW = 0x00000000 Global Const $OBJID_SYSMENU = 0xFFFFFFFF ;Global Const $OBJID_TITLEBAR = 0xFFFFFFFE Global Const $OBJID_MENU = 0xFFFFFFFD Global Const $OBJID_CLIENT = 0xFFFFFFFC Global Const $OBJID_VSCROLL = 0xFFFFFFFB Global Const $OBJID_HSCROLL = 0xFFFFFFFA ;Global Const $OBJID_SIZEGRIP = 0xFFFFFFF9 ;Global Const $OBJID_CARET = 0xFFFFFFF8 ;Global Const $OBJID_CURSOR = 0xFFFFFFF7 ;Global Const $OBJID_ALERT = 0xFFFFFFF6 ;Global Const $OBJID_SOUND = 0xFFFFFFF5 Global Const $OBJID_QUERYCLASSNAMEIDX = 0xFFFFFFF4 Global Const $OBJID_NATIVEOM = 0xFFFFFFF0 ; Object roles Global Const $ROLE_SYSTEM_TITLEBAR = 0x1 Global Const $ROLE_SYSTEM_MENUBAR = 0x2 Global Const $ROLE_SYSTEM_SCROLLBAR = 0x3 Global Const $ROLE_SYSTEM_GRIP = 0x4 Global Const $ROLE_SYSTEM_SOUND = 0x5 Global Const $ROLE_SYSTEM_CURSOR = 0x6 Global Const $ROLE_SYSTEM_CARET = 0x7 Global Const $ROLE_SYSTEM_ALERT = 0x8 Global Const $ROLE_SYSTEM_WINDOW = 0x9 Global Const $ROLE_SYSTEM_CLIENT = 0xa Global Const $ROLE_SYSTEM_MENUPOPUP = 0xb Global Const $ROLE_SYSTEM_MENUITEM = 0xc Global Const $ROLE_SYSTEM_TOOLTIP = 0xd Global Const $ROLE_SYSTEM_APPLICATION = 0xe Global Const $ROLE_SYSTEM_DOCUMENT = 0xf Global Const $ROLE_SYSTEM_PANE = 0x10 Global Const $ROLE_SYSTEM_CHART = 0x11 Global Const $ROLE_SYSTEM_DIALOG = 0x12 Global Const $ROLE_SYSTEM_BORDER = 0x13 Global Const $ROLE_SYSTEM_GROUPING = 0x14 Global Const $ROLE_SYSTEM_SEPARATOR = 0x15 Global Const $ROLE_SYSTEM_TOOLBAR = 0x16 Global Const $ROLE_SYSTEM_STATUSBAR = 0x17 Global Const $ROLE_SYSTEM_TABLE = 0x18 Global Const $ROLE_SYSTEM_COLUMNHEADER = 0x19 Global Const $ROLE_SYSTEM_ROWHEADER = 0x1a Global Const $ROLE_SYSTEM_COLUMN = 0x1b Global Const $ROLE_SYSTEM_ROW = 0x1c Global Const $ROLE_SYSTEM_CELL = 0x1d Global Const $ROLE_SYSTEM_LINK = 0x1e Global Const $ROLE_SYSTEM_HELPBALLOON = 0x1f Global Const $ROLE_SYSTEM_CHARACTER = 0x20 Global Const $ROLE_SYSTEM_LIST = 0x21 Global Const $ROLE_SYSTEM_LISTITEM = 0x22 Global Const $ROLE_SYSTEM_OUTLINE = 0x23 Global Const $ROLE_SYSTEM_OUTLINEITEM = 0x24 Global Const $ROLE_SYSTEM_PAGETAB = 0x25 Global Const $ROLE_SYSTEM_PROPERTYPAGE = 0x26 Global Const $ROLE_SYSTEM_INDICATOR = 0x27 Global Const $ROLE_SYSTEM_GRAPHIC = 0x28 Global Const $ROLE_SYSTEM_STATICTEXT = 0x29 Global Const $ROLE_SYSTEM_TEXT = 0x2a Global Const $ROLE_SYSTEM_PUSHBUTTON = 0x2b Global Const $ROLE_SYSTEM_CHECKBUTTON = 0x2c Global Const $ROLE_SYSTEM_RADIOBUTTON = 0x2d Global Const $ROLE_SYSTEM_COMBOBOX = 0x2e Global Const $ROLE_SYSTEM_DROPLIST = 0x2f Global Const $ROLE_SYSTEM_PROGRESSBAR = 0x30 Global Const $ROLE_SYSTEM_DIAL = 0x31 Global Const $ROLE_SYSTEM_HOTKEYFIELD = 0x32 Global Const $ROLE_SYSTEM_SLIDER = 0x33 Global Const $ROLE_SYSTEM_SPINBUTTON = 0x34 Global Const $ROLE_SYSTEM_DIAGRAM = 0x35 Global Const $ROLE_SYSTEM_ANIMATION = 0x36 Global Const $ROLE_SYSTEM_EQUATION = 0x37 Global Const $ROLE_SYSTEM_BUTTONDROPDOWN = 0x38 Global Const $ROLE_SYSTEM_BUTTONMENU = 0x39 Global Const $ROLE_SYSTEM_BUTTONDROPDOWNGRID = 0x3a Global Const $ROLE_SYSTEM_WHITESPACE = 0x3b Global Const $ROLE_SYSTEM_PAGETABLIST = 0x3c Global Const $ROLE_SYSTEM_CLOCK = 0x3d Global Const $ROLE_SYSTEM_SPLITBUTTON = 0x3e Global Const $ROLE_SYSTEM_IPADDRESS = 0x3f Global Const $ROLE_SYSTEM_OUTLINEBUTTON = 0x40 ; Object state constants Global Const $STATE_SYSTEM_NORMAL = 0 Global Const $STATE_SYSTEM_UNAVAILABLE = 0x1 Global Const $STATE_SYSTEM_SELECTED = 0x2 Global Const $STATE_SYSTEM_FOCUSED = 0x4 ;Global Const $STATE_SYSTEM_PRESSED = 0x8 Global Const $STATE_SYSTEM_CHECKED = 0x10 Global Const $STATE_SYSTEM_MIXED = 0x20 Global Const $STATE_SYSTEM_INDETERMINATE = $STATE_SYSTEM_MIXED Global Const $STATE_SYSTEM_READONLY = 0x40 Global Const $STATE_SYSTEM_HOTTRACKED = 0x80 Global Const $STATE_SYSTEM_DEFAULT = 0x100 Global Const $STATE_SYSTEM_EXPANDED = 0x200 Global Const $STATE_SYSTEM_COLLAPSED = 0x400 Global Const $STATE_SYSTEM_BUSY = 0x800 Global Const $STATE_SYSTEM_FLOATING = 0x1000 Global Const $STATE_SYSTEM_MARQUEED = 0x2000 Global Const $STATE_SYSTEM_ANIMATED = 0x4000 ;Global Const $STATE_SYSTEM_INVISIBLE = 0x8000 Global Const $STATE_SYSTEM_OFFSCREEN = 0x10000 Global Const $STATE_SYSTEM_SIZEABLE = 0x20000 Global Const $STATE_SYSTEM_MOVEABLE = 0x40000 Global Const $STATE_SYSTEM_SELFVOICING = 0x80000 Global Const $STATE_SYSTEM_FOCUSABLE = 0x100000 Global Const $STATE_SYSTEM_SELECTABLE = 0x200000 Global Const $STATE_SYSTEM_LINKED = 0x400000 Global Const $STATE_SYSTEM_TRAVERSED = 0x800000 Global Const $STATE_SYSTEM_MULTISELECTABLE = 0x1000000 Global Const $STATE_SYSTEM_EXTSELECTABLE = 0x2000000 Global Const $STATE_SYSTEM_ALERT_LOW = 0x4000000 Global Const $STATE_SYSTEM_ALERT_MEDIUM = 0x8000000 Global Const $STATE_SYSTEM_ALERT_HIGH = 0x10000000 Global Const $STATE_SYSTEM_PROTECTED = 0x20000000 Global Const $STATE_SYSTEM_HASPOPUP = 0x40000000 Global Const $STATE_SYSTEM_VALID = 0x7fffffff ; Event constants ;#include "APIConstants.au3" ; AutoIt 3.3.8.0+ #include <APISysConstants.au3> ; AutoIt 3.3.10.0+ #cs Global Const $EVENT_MIN = 0x00000001 Global Const $EVENT_SYSTEM_SOUND = 0x00000001 Global Const $EVENT_SYSTEM_ALERT = 0x00000002 Global Const $EVENT_SYSTEM_FOREGROUND = 0x00000003 Global Const $EVENT_SYSTEM_MENUSTART = 0x00000004 Global Const $EVENT_SYSTEM_MENUEND = 0x00000005 Global Const $EVENT_SYSTEM_MENUPOPUPSTART = 0x00000006 Global Const $EVENT_SYSTEM_MENUPOPUPEND = 0x00000007 Global Const $EVENT_SYSTEM_CAPTURESTART = 0x00000008 Global Const $EVENT_SYSTEM_CAPTUREEND = 0x00000009 Global Const $EVENT_SYSTEM_MOVESIZESTART = 0x0000000A Global Const $EVENT_SYSTEM_MOVESIZEEND = 0x0000000B Global Const $EVENT_SYSTEM_CONTEXTHELPSTART = 0x0000000C Global Const $EVENT_SYSTEM_CONTEXTHELPEND = 0x0000000D Global Const $EVENT_SYSTEM_DRAGDROPSTART = 0x0000000E Global Const $EVENT_SYSTEM_DRAGDROPEND = 0x0000000F Global Const $EVENT_SYSTEM_DIALOGSTART = 0x00000010 Global Const $EVENT_SYSTEM_DIALOGEND = 0x00000011 Global Const $EVENT_SYSTEM_SCROLLINGSTART = 0x00000012 Global Const $EVENT_SYSTEM_SCROLLINGEND = 0x00000013 Global Const $EVENT_SYSTEM_SWITCHSTART = 0x00000014 Global Const $EVENT_SYSTEM_SWITCHEND = 0x00000015 Global Const $EVENT_SYSTEM_MINIMIZESTART = 0x00000016 Global Const $EVENT_SYSTEM_MINIMIZEEND = 0x00000017 Global Const $EVENT_SYSTEM_DESKTOPSWITCH = 0x00000020 Global Const $EVENT_OBJECT_CREATE = 0x00008000 Global Const $EVENT_OBJECT_DESTROY = 0x00008001 Global Const $EVENT_OBJECT_SHOW = 0x00008002 Global Const $EVENT_OBJECT_HIDE = 0x00008003 Global Const $EVENT_OBJECT_REORDER = 0x00008004 Global Const $EVENT_OBJECT_FOCUS = 0x00008005 Global Const $EVENT_OBJECT_SELECTION = 0x00008006 Global Const $EVENT_OBJECT_SELECTIONADD = 0x00008007 Global Const $EVENT_OBJECT_SELECTIONREMOVE = 0x00008008 Global Const $EVENT_OBJECT_SELECTIONWITHIN = 0x00008009 Global Const $EVENT_OBJECT_STATECHANGE = 0x0000800A Global Const $EVENT_OBJECT_LOCATIONCHANGE = 0x0000800B Global Const $EVENT_OBJECT_NAMECHANGE = 0x0000800C Global Const $EVENT_OBJECT_DESCRIPTIONCHANGE = 0x0000800D Global Const $EVENT_OBJECT_VALUECHANGE = 0x0000800E Global Const $EVENT_OBJECT_PARENTCHANGE = 0x0000800F Global Const $EVENT_OBJECT_HELPCHANGE = 0x00008010 Global Const $EVENT_OBJECT_DEFACTIONCHANGE = 0x00008011 Global Const $EVENT_OBJECT_ACCELERATORCHANGE = 0x00008012 Global Const $EVENT_OBJECT_INVOKED = 0x00008013 Global Const $EVENT_OBJECT_TEXTSELECTIONCHANGED = 0x00008014 Global Const $EVENT_OBJECT_CONTENTSCROLLED = 0x00008015 Global Const $EVENT_MAX = 0x7FFFFFFF Global Const $WINEVENT_INCONTEXT = 0x04 Global Const $WINEVENT_OUTOFCONTEXT = 0x00 Global Const $WINEVENT_SKIPOWNPROCESS = 0x02 Global Const $WINEVENT_SKIPOWNTHREAD = 0x01 #ce ; ========= MS Active Accessibility interface ========= ; Copied from CUIAutomation2.au3 by junkew Global Const $sIID_IAccessible="{618736E0-3C3D-11CF-810C-00AA00389B71}" Global $dtagIAccessible = "GetTypeInfoCount hresult(uint*);" & _ ; IDispatch "GetTypeInfo hresult(uint;int;ptr*);" & _ "GetIDsOfNames hresult(struct*;wstr;uint;int;int);" & _ "Invoke hresult(int;struct*;int;word;ptr*;ptr*;ptr*;uint*);" & _ "get_accParent hresult(ptr*);" & _ ; IAccessible "get_accChildCount hresult(long*);" & _ "get_accChild hresult(variant;idispatch*);" & _ "get_accName hresult(variant;bstr*);" & _ "get_accValue hresult(variant;bstr*);" & _ "get_accDescription hresult(variant;bstr*);" & _ "get_accRole hresult(variant;variant*);" & _ "get_accState hresult(variant;variant*);" & _ "get_accHelp hresult(variant;bstr*);" & _ "get_accHelpTopic hresult(bstr*;variant;long*);" & _ "get_accKeyboardShortcut hresult(variant;bstr*);" & _ "get_accFocus hresult(struct*);" & _ "get_accSelection hresult(variant*);" & _ "get_accDefaultAction hresult(variant;bstr*);" & _ "accSelect hresult(long;variant);" & _ "accLocation hresult(long*;long*;long*;long*;variant);" & _ "accNavigate hresult(long;variant;variant*);" & _ "accHitTest hresult(long;long;variant*);" & _ "accDoDefaultAction hresult(variant);" & _ "put_accName hresult(variant;bstr);" & _ "put_accValue hresult(variant;bstr);" Global Const $tIID_IAccessible = CLSIDFromString( $sIID_IAccessible ) ; ===================================================== Global Const $hdllOleacc = DllOpen( "oleacc.dll" ) OnAutoItExitRegister( "ExitMSAccessibility" ) Func ExitMSAccessibility() DllClose( $hdllOleacc ) EndFunc Func AccessibleChildren( $paccContainer, $iChildStart, $iChildren, ByRef $tVarChildren, ByRef $iObtained ) Local $sVarArray = "" For $i = 1 To $iChildren $sVarArray &= $tagVARIANT Next $tVarChildren = DllStructCreate( $sVarArray ) Local $aRet = DllCall( "oleacc.dll", "int", "AccessibleChildren", "ptr", $paccContainer, "int", $iChildStart, "int", $iChildren, "struct*", $tVarChildren, "int*", 0 ) If @error Then Return SetError(1, 0, $S_FALSE) If $aRet[0] Then Return SetError(2, 0, $aRet[0]) $iObtained = $aRet[5] Return $S_OK EndFunc Func AccessibleObjectFromEvent( $hWnd, $iObjectID, $iChildID, ByRef $pAccessible, ByRef $tVarChild ) Local $tVARIANT = DllStructCreate( $tagVARIANT ) Local $aRet = DllCall( $hdllOleacc, "int", "AccessibleObjectFromEvent", "hwnd", $hWnd, "dword", $iObjectID, "dword", $iChildID, "ptr*", 0, "struct*", $tVARIANT ) If @error Then Return SetError(1, 0, $S_FALSE) If $aRet[0] Then Return SetError(2, 0, $aRet[0]) $pAccessible = $aRet[4] $tVarChild = $aRet[5] Return $S_OK EndFunc Func AccessibleObjectFromPoint( $x, $y, ByRef $pAccessible, ByRef $tVarChild ) Local $tPOINT = DllStructCreate( "long;long" ) DllStructSetData( $tPOINT, 1, $x ) DllStructSetData( $tPOINT, 2, $y ) Local $tPOINT64 = DllStructCreate( "int64", DllStructGetPtr( $tPOINT ) ) Local $tVARIANT = DllStructCreate( $tagVARIANT ) Local $aRet = DllCall( $hdllOleacc, "int", "AccessibleObjectFromPoint", "int64", DllStructGetData( $tPOINT64, 1 ), "ptr*", 0, "struct*", $tVARIANT ) If @error Then Return SetError(1, 0, $S_FALSE) If $aRet[0] Then Return SetError(2, 0, $aRet[0]) $pAccessible = $aRet[2] $tVarChild = $aRet[3] Return $S_OK EndFunc Func AccessibleObjectFromWindow( $hWnd, $iObjectID, $tRIID, ByRef $pObject ) Local $aRet = DllCall( $hdllOleacc, "int", "AccessibleObjectFromWindow", "hwnd", $hWnd, "dword", $iObjectID, "struct*", $tRIID, "int*", 0 ) If @error Then Return SetError(1, 0, $S_FALSE) If $aRet[0] Then Return SetError(2, 0, $aRet[0]) $pObject = $aRet[4] Return $S_OK EndFunc Func WindowFromAccessibleObject( $pAccessible, ByRef $hWnd ) Local $aRet = DllCall( $hdllOleacc, "int", "WindowFromAccessibleObject", "ptr", $pAccessible, "hwnd*", 0 ) If @error Then Return SetError(1, 0, $S_FALSE) If $aRet[0] Then Return SetError(2, 0, $aRet[0]) $hWnd = $aRet[2] Return $S_OK EndFunc Func GetRoleText( $iRole, $sRole, $iRoleMax ) Local $aRet = DllCall( $hdllOleacc, "uint", "GetRoleTextW", "dword", $iRole, "ptr", $sRole, "uint", $iRoleMax ) If @error Then Return SetError(1, 0, 0) If Not $aRet[0] Then Return SetError(2, 0, 0) Return $aRet[0] EndFunc Func GetStateText( $iStateBit, $sStateBit, $iStateBitMax ) Local $aRet = DllCall( $hdllOleacc, "uint", "GetStateTextW", "dword", $iStateBit, "ptr", $sStateBit, "uint", $iStateBitMax ) If @error Then Return SetError(1, 0, 0) If Not $aRet[0] Then Return SetError(2, 0, 0) Return $aRet[0] EndFunc ; Copied form WinAPISys.au3 ; Authors: KaFu, Yashied, Jpm Func SetWinEventHook($iEventMin, $iEventMax, $pEventProc, $iProcessID = 0, $iThreadID = 0, $iFlags = 0) Local $Ret = DllCall('user32.dll', 'handle', 'SetWinEventHook', 'uint', $iEventMin, 'uint', $iEventMax, 'ptr', 0, _ 'ptr', $pEventProc, 'dword', $iProcessID, 'dword', $iThreadID, 'uint', $iFlags) If @error Then Return SetError(@error, @extended, 0) Return $Ret[0] EndFunc ; Copied form WinAPISys.au3 ; Authors: KaFu, Yashied, Jpm Func UnhookWinEvent($hEventHook) Local $Ret = DllCall('user32.dll', 'bool', 'UnhookWinEvent', 'handle', $hEventHook) If @error Then Return SetError(@error, @extended, False) Return $Ret[0] EndFunc ; Copied form WinAPICom.au3 ; Authors: Yashied, Jpm Func CoTaskMemFree($pMemory) DllCall('ole32.dll', 'none', 'CoTaskMemFree', 'ptr', $pMemory) If @error Then Return SetError(@error, @extended, 0) Return 1 EndFunc ; Copied and slightly modified from AutoItObject.au3 by the AutoItObject-Team Func CLSIDFromString( $sIID ) Local $tCLSID = DllStructCreate( "dword;word;word;byte[8]" ) Local $aRet = DllCall( "ole32.dll", "long", "CLSIDFromString", "wstr", $sIID, "struct*", $tCLSID ) If @error Then Return SetError(1, @error, 0) If $aRet[0] <> 0 Then Return SetError(2, $aRet[0], 0) Return $tCLSID EndFunc Func PrintElementInfo( $oElement, $iChild, $sIndent ) Local $sName, $iRole, $sRole, $iRoleLen Local $iState, $sState, $iStateLen Local $sValue, $x, $y, $w, $h If $iChild <> $CHILDID_SELF Then _ ConsoleWrite( $sIndent & "$iChildElem = " & $iChild & @CRLF ) $oElement.get_accName( $iChild, $sName ) ConsoleWrite( $sIndent & "$sName = " & $sName & @CRLF ) If $oElement.get_accRole( $iChild, $iRole ) = $S_OK Then ConsoleWrite( $sIndent & "$iRole = 0x" & Hex( $iRole ) & @CRLF ) $iRoleLen = GetRoleText( $iRole, 0, 0 ) + 1 $sRole = DllStructCreate( "wchar[" & $iRoleLen & "]" ) GetRoleText( $iRole, DllStructGetPtr( $sRole ), $iRoleLen ) ConsoleWrite( $sIndent & "$sRole = " & DllStructGetData( $sRole, 1 ) & @CRLF ) EndIf If $oElement.get_accState( $iChild, $iState ) = $S_OK Then ConsoleWrite( $sIndent & "$iState = 0x" & Hex( $iState ) & @CRLF ) $iStateLen = GetStateText( $iState, 0, 0 ) + 1 $sState = DllStructCreate( "wchar[" & $iStateLen & "]" ) GetStateText( $iState, DllStructGetPtr( $sState ), $iStateLen ) ConsoleWrite( $sIndent & "$sState = " & DllStructGetData( $sState, 1 ) & @CRLF ) EndIf If $oElement.get_accValue( $iChild, $sValue ) = $S_OK Then _ ConsoleWrite( $sIndent & "$sValue = " & $sValue & @CRLF ) IF $oElement.accLocation( $x, $y, $w, $h, $iChild ) = $S_OK Then _ ConsoleWrite( $sIndent & "$x, $y, $w, $h = " & $x & ", " & $y & ", " & $w & ", " & $h & @CRLF ) ConsoleWrite( @CRLF ) EndFunc
    1 point
  9. Yes the problem is the remotepath it mustn't be blank. Here a small script i wrote in 2011: ;https://autoit.de/index.php/Thread/14918-Deutsche-Hilfe-Funktionen-ohne-Beispiel/?postID=214046#post214046#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <FTPEx.au3> #include <File.au3> #include <Array.au3> Opt('MustDeclareVars', 1) _example2() Func _example2() ;lädt alle Dateien eines Ordner mithilfe _FTP_FilePut auf den FTP-Server (noch ohne Unterordner) Local $s_ServerName = 'guest.autobert.myplace.net' ;dieser Server existiert nicht Local $s_Username = "guest" Local $s_Password = "TopSecret" Local $s_LocalFolder = @ScriptDir ;das angegebene Verzsichnis muss existieren Local $s_RemoteFolder = "/FTPTestfiles/Test/" ;dieser Ordner wird notfalls angelegt Local $i_Passive = 0 ;manche Server benötigen hier eine 1 für Passiven Modus Local $l_InternetSession, $l_FTPSession, $errOpen, $errFTP $l_InternetSession = _FTP_Open('AuoItZilla') ;Öffnet eine FTP Sitzung $errOpen = @error If Not @error Then $l_FTPSession = _FTP_Connect($l_InternetSession, $s_ServerName, $s_Username, $s_Password, $i_Passive) ;Verbindet zu einem FTP Server $errFTP = @error If Not @error Then _FolderPut($l_FTPSession, $s_LocalFolder, $s_RemoteFolder, "_FTP*3.au3") ;kopiert alle au3 Dateien If Not @error Then ConsoleWrite("_FolderPut: " & @extended & " Dateien erfolgreich übertragen" & @CRLF) Else ConsoleWrite("_FolderPut Fehler:" & @error & " " & @extended & @CRLF) EndIf Else MsgBox(0, "Connect", "fehlgeschlagen") ConsoleWrite("Connect: " & " " & $errFTP & @CRLF) EndIf Else MsgBox(0, "Open", "fehlgeschlagen") ConsoleWrite("Open " & " " & $errOpen & @CRLF) EndIf _FTP_Close($l_InternetSession) ;schliesst die Sitzung EndFunc ;==>_example2 Func _FolderPut($l_FTPSession, $s_LocalFolder, $s_RemoteFolder, $sFilter = "*") Local $bDebugFP = True ;um Debuginfos an- auszuschalten If $bDebugFP Then ConsoleWrite("Lokal " & $s_LocalFolder & " Remote " & $s_RemoteFolder & @CRLF) if StringRight($s_RemoteFolder,1) <> "/" Then $s_RemoteFolder &= "/" if StringLeft($s_RemoteFolder,1) <> "/" Then $s_RemoteFolder = "/" & $s_RemoteFolder Local $aPathSplit = StringSplit($s_RemoteFolder, "/") _ArrayDisplay($aPathSplit) For $i = 2 To $aPathSplit[0] -1 ;Element 1 ist leer ebenso letztes durch StringTrim..... If $bDebugFP Then ConsoleWrite($aPathSplit[$i]) _FTP_DirSetCurrent($l_FTPSession, $aPathSplit[$i]) If @error Then If $bDebugFP Then ConsoleWrite(@TAB & "wird versucht anzulegen" & @TAB) _FTP_DirCreate($l_FTPSession, $aPathSplit[$i]) _FTP_DirSetCurrent($l_FTPSession, $aPathSplit[$i]) If @error Then If $bDebugFP Then ConsoleWrite("Fehler " & @error & @CRLF) SetError(1, $i) Return 0 Else If $bDebugFP Then ConsoleWrite("OK" & @crlf) EndIf Else If $bDebugFP Then ConsoleWrite("/") EndIf Next If $bDebugFP Then ConsoleWrite(@CRLF & "Aktuelles Verzeichnis" & _FTP_DirGetCurrent($l_FTPSession) & @CRLF) Local $aUpload_Files = _FileListToArray($s_LocalFolder, $sFilter, 1) Local $iErrors = 0 Local $iSuccess = 0 For $i = 1 To $aUpload_Files[0] If $bDebugFP Then ConsoleWrite($aUpload_Files[$i] & @TAB) If _FTP_FilePut($l_FTPSession, $aUpload_Files[$i], $aUpload_Files[$i]) Then $iSuccess +=1 If $bDebugFP Then ConsoleWrite("OK" & @CRLF) Else $iErrors += 1 If $bDebugFP Then ConsoleWrite("Fehler: " & @error & @CRLF) EndIf Next if $iErrors > 0 Then SetError(2, $iErrors, 0) Else SetExtended($iSuccess) EndIf EndFunc ;==>_FolderPut Note: the func _FolderPut is non recursiv.
    1 point
  10. This HTML shows that there there are used IFRAMES. You should to know that each FRAME is separate doucument. Try to use: Local $oIEFrame = _IEFrameGetCollection($oIE,....) or Local $oIEFrame = _IEFrameGetObjByName($oIE,...) and then use $oIEFrame as you are using $oIE to this time.
    1 point
  11. markyrocks

    Memory in autoit

    I am very interested in this. Only thing I can add is... did you #requireadmin?
    1 point
  12. Don't mind at all. Don't know squat about ssl implementation but I'm in school for IT Net Administration + Forensics which includes a ton of coding so I'm sure I'll figure it out within the next couple years Dx EDIT: Actually, would you like permission to make commits to the actual github?
    1 point
  13. Chimp, I've added the feature to the list of tasks for the next version.
    1 point
  14. JohnOne

    get Mouse Pos in Rect

    ToolTip($hPos[0] - $iPosX & " , " & $hPos[1] - $iPosY)
    1 point
  15. I think I found a bug. If I have the word "abcdefxyztg" in the list and I type "a" then only the word "abcdefxy" will be displayed. Everything including the z is truncated. I think you should replace this lines Func _GetItemsArr($sSubString) Return StringRegExp($___nList, "(?sm" & $___C_Sensitive & ")\" & $___sDelimiter & "(\Q" & StringRegExpReplace($sSubString, "\\", "[\1]") & "\E[^\z\" & $___sDelimiter & "]+)" , 3) EndFunc with this lines Func _GetItemsArr($sSubString) Return StringRegExp($___nList, "(?sm" & $___C_Sensitive & ")\" & $___sDelimiter & "(\Q" & StringRegExpReplace($sSubString, "\\", "[\1]") & "\E[^\" & $___sDelimiter & "]+)" , 3) EndFunc
    1 point
  16. TheSaint

    How Efficient is AutoIT

    Yes I have, and last time I used it, it was way outside the same league as TeraCopy, as regards a Windows copy/move replacement. With TeraCopy, you get md5 checking and you can do comparisons, and best of all, you can queue up jobs from various locations to various destinations .... and even add to existing jobs. The process even continues to work when individual elements fail, and doesn't spit the dummy (like Windows does) at a bad copy etc, just reports every instance when finished, and you get the ability to try again for just those files. You get even more with the paid for Pro version. My memory of RoboCopy, is that it is a very different kind of fish and much more complex. TeraCopy can be as seamless as you like it too - either fully replacing the regular Windows processes, or like I use it, via right-click and/or copy and drag ... which is brilliant, as I can still use the regular Windows processes for small stuff if I so wish. In fact, I recall hearing or reading somewhere, that Microsoft were interested in the product ... it's that good. EDIT When copying/moving lots of files and/or big files (especially) around, I've known Windows to fail and not advise. Generally you don't realize this until a later date, when you come across 0 byte files. This is usually from one harddrive to another, and appears to be a memory related issue regarding indexing. This happens with TeraCopy too in the same circumstances, but the difference, is that it gets reported and you can see immediately what elements failed and can very simply select just them in the GUI to try again and again and again, until they all succeed. This happens on some PC's more than others, and most people are unaware of the Windows failures, until it is too late (years hence). If you think it hasn't happened to you, then I'm sorry, but I have some bad news for you. I'm lucky, because I always keep multiple copies of my files on different drives/discs/etc. In fact, I only became aware of the problem, when I decided to relocate some stuff years later, using CDCheck (works with disc and drive folders) to make sure all copied ok. I rarely use CDCheck now, because TeraCopy is that good. Once I realized there was an issue, and until I came across TeraCopy, I had to double and triple check every important Copy and Move I did ... for years. Being aware of the issue, and checking, I also discovered how often (to my disgust) the errors occur, without notification. TeraCopy has been a brilliant step forward and gives me peace of mind. EDIT 2 I've wondered for decades, why many of the features available now with TeraCopy, weren't standard abilities in the regular Windows' processes. I could never understand why Microsoft never improved something, that we use many times a day, that was so hugely lacking. EDIT 3 TeraCopy also has a command-line ability, which I regularly use in scripted automation.
    1 point
  17. Thank you for the reply. When I pressed F6, typed the following path, and pressed OK, I got an error. $(sys.PROGRAMFILES)\AutoIt3\AutoIt3.exe $(FULL_CURRENT_PATH) AutoIt Error Line 0 (File "C:\Documents"): Error: Error opening the file. So, I tried the path to have quotation marks and it worked. Thank you so much. $(sys.PROGRAMFILES)\AutoIt3\AutoIt3.exe "$(FULL_CURRENT_PATH)" However, when I do it from F5, nothing happens. I tried the following four lines for F5, $(sys.PROGRAMFILES)\AutoIt3\AutoIt3.exe $(FULL_CURRENT_PATH) $(sys.PROGRAMFILES)\AutoIt3\AutoIt3.exe "$(FULL_CURRENT_PATH)" C:\Program Files\AutoIt3\AutoIt3.exe $(FULL_CURRENT_PATH) C:\Program Files\AutoIt3\AutoIt3.exe "$(FULL_CURRENT_PATH)" Just for now, I'll go with the F6 solution, but if anybody knows what I should do with F5 please let me know. Edit: the following line worked for F5. Thanks. "C:\Program Files\AutoIt3\AutoIt3.exe" "$(FULL_CURRENT_PATH)"
    1 point
×
×
  • Create New...