Jump to content

Leaderboard

Popular Content

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

  1. Sers, while working on another project I was in need of desktop notifications. I wanted an own implementation and from time to time the code grew and I thought about sharing it with the world. I know that there is a similar UDF out there but when my project got bigger an UDF was the best choice for me. As you can see the UDF's differ in usage and style of notifications. So, what do we have? The UDF offers the usage of permanent desktop notifications for your own script in a very easy way. Notifications are starting in the bottom right corner of your main screen and will be shown on top until there is no more space. Further notifications will be shown if previous ones are closed. The notifications have a nice minimalistic design in two colors. By default they match the look of the dark taskbar in Windows 10, but colors and other things can be set differently if wished (see example scripts). The UDF works for GUIOnEventMode activated and deactivated and detects it automatically. Show me! Each notification has its GUI, a title, the message, a seperating line, date label, time label and a closing button (and if activated, a border around the notification). The color of the title, message, seperating line, date, time and closing button (+ border if activated) have all the text color. Right now notifications have a fixed size. I thought about variable sizes but did not add it because I didn't need it so far. Some people may notice the shorter seperating line when border is activated, thats just because of better looks Notifications will be colored as the following: Windows 10: they match the design of the taskbar Windows 8/8.1: On most designs: they match the border color of active windows, else they are black with transparency (see screenshot) Windows 7 and earlier: black with transparency (sry aero) How do I use notifications in my script? include UDF call _Notifications_Startup() (after you determined if you want to use GUIOnEventMode or not) If GUIOneventMode deactivated: call _Notifications_CheckGUIMsg($__GUIMsg) in your main loop create a notification using _Notifications_Create($__title, $__message) Between step 2 and 3 you can set various options: _Notifications_SetAnimationTime _Notifications_SetBorder _Notifications_SetButtonText _Notifications_SetBkColor _Notifications_SetColor _Notifications_SetDateFormat _Notifications_SetSound _Notifications_SetTextAlign _Notifications_SetTimeFormat _Notifications_SetTransparency You can also set own functions to be called when notifications are clicked (see advanced example). And now? You can find more information in the UDF. There also are two example scripts to show the usage for GUIOnEventMode activated and deactivated. Another advanced example shows the usage of the Set-Functions. Thats it? Yup, have fun. Changelog Notifications.au3 ( v1.2) Notifications GUIMsg Example.au3 Notifications OnEvent Example.au3 Notifications Advanced Example.au3
    2 points
  2. Automate all windows and browser applications with one UDF function library. Based on the microsoft automation API this library high level supports Recognition of conttrols from EDGE, Chrome, FF, Opera, Safari and Windows native apps Small testing framework to split object repository from coding away Introduction Quickstart - Getting started quickly Simple scripts With this module you can automate all applications/programs that support ui automation and/or accesibility api from microsoft you can recognize more controls than AutoIT can recognize "out of the box" you can use concepts from other testing frameworks like http://download.freedesktop.org/ldtp/doc/ldtp-tutorial.pdf http://safsdev.sourceforge.net/Default.htm coded ui testing from microsoft Some of those controls / applications are chrome browser (partly mainwindow has to be done with MSAA for navigating) chrome://accessibility in the adress bar of chrome or start with "--force-renderer-accessibility" silverlight controls Ribbon control controlbars of Excel/Word IE and FF browsers Windows Media Player Windows clock AFX .. controls (partly) .... Based on the initial AIO Object I now have made the interface file to work with objCreateInterface function which is in the latest beta's automate clicking and querying basic information It gives you a lot of basic information to be able to automate clicking, querying basic information where it goes further in certain situations than AutoIt is identifying Starting threads for background on the ui automation api of microsoft (not for starters) http://en.wikipedia.org/wiki/Microsoft_UI_Automation http://msdn.microsoft.com/en-us/library/ms747327.aspx Previous threads in general help/support Interface AutoItObject IUIAutomation ObjCreateInterface and struct tagPoint in method ElementFromPoint Be aware that API is not allways installed under XP/Vista see http://support.microsoft.com/kb/971513 Within Windows 7 and Windows 8 it should be preinstalled by default. Be aware on 32 and 64 bits way of running your script #AutoIt3Wrapper_UseX64=Y or N Basic example of usage / showing and retrieving the default information, will post multiple examples later Hover your mouse to an area of interest and press ctrl+w and information will be shown in the edit box of the form Simple spy demo (see simplespy.au3 or use latest ZIP attachment for latest version) Main features Recognize windows and html controls for the major browsers Logical and physical description for controls (UI mapping, Application map) Simple repository logic to abstract logical and physical descriptions Store Runtime Type Information in RTI. variables Rubberbanding/highlighting of objects Simple spy to help in making / identifying the physical description Support of regular expression(s) in identifying objects recognize objects on multiple properties supported properties: name ,title, automationid, classname, class, iaccessiblevalue, iaccessiblechildId, controltype, processid, acceleratorkey The actions provided so far "leftclick", "left", "click", "leftdoubleclick", "leftdouble", "doubleclick", _ "rightclick", "right", "rightdoubleclick", "rightdouble", _ "middleclick", "middle", "middledoubleclick", "middledouble", "mousemove", "movemouse" "setvalue","settextvalue" "setvalue using keys" "setValue using clipboard" "getvalue" "sendkeys", "enterstring", "type", "typetext" "invoke" "focus", "setfocus", "activate" "close" "move","setposition" "resize" "minimize", "maximize", "normal", "close", "exist", "exists" "searchcontext", "context" "highlight" "getobject","object" "attach" "capture","screenshot", "takescreenshot" "dump", "dumpthemall" "propertyvalue", "property" match on multiple properties like: name:=((Zoeken.*)|(Find.*)); ControlType:=Button; acceleratorkey:=Ctrl+F Support for 117 different properties see $UIA_propertiesSupportedArray in uiawrappers like for example title, regexptitle, class, regexpclass, iaccessiblevalue, iaccessiblechildid, name, accesskey, automationid, classname IAccessible, IAccessible2, ISimpleDom interfaces debuglogging to a file log.txt (no output in scitewindow) Examples Example 1 Iterating thru the different ways of representing the objects in the tree (#comment-1105548) Example 2 Finding the taskbar and clicking on the start menu button (#comment-1105680) Example 3 Clicking a litlle more and in the end displaying all items from the clock (thats not directly possible with AU3Info) (#comment-1108849) Example 4 that demonstrates the calculator Example 5 Automating chrome Example 6 Demonstrates all stuff within chrome to navigate html pages, find hyperlink, click hyperlink, find picture, click picture, enter data in inputbox Example 7 The chrome example modified to a firefox example Example 8 The other major browser Internet Explorer automated (made on Example 6 and 7) Example 9 Windows media player Example 10 Automating mach 3 (AFX windows and other hard to get recognized by AutoIT) Lot of links are broken due to forum upgrade just search for the text like "Example 11 Demonstrate Word, Notepad and Calculator actions" Example 11 Demonstrate Word, Notepad and Calculator actions ... Example 13 Details 1 about the right pane of the windows explorer Example 14 Details 2 about the right pane of the windows explorer Example 15 Details 3 about the right pane of the windows explorer Example 16 Details 4 about the right pane of the windows explorer Example 17 Details 5 about the right pane of the windows explorer WITH CACHING Example 18 Details 6 about the right pane of the windows explorer WITH VIRTUAL ITEMS Example 19 Eventhandling examples Example 20 Eventhandling examples Example 21a Eventhandling examples Internet Explorer Example 21b Eventhandling examples Internet Explorer Example 22 Eventhandling examples Follow focus Example 23 Eventhandling examples structure changed Example 24 Eventhandling examples IUIAutomationEventHandler Example 25 SAFEARRAYS Example 26 IACCESSIBLE / MSAA Example 27 IACCESSIBLE2 / MSAA Example 28 IACCESSIBLE / MSAA events Example 29 IACCESSIBLE2 events Example 30 ISimpleDOM Example 31 Notepad window move, maximize, minimize Example 32 Three browsers doing the same stuff with small differences in scripting only .. TODO Build recorder Enhance the spy with a nicer UI UI for the repository (now in the script with dot notation) Enhance mapping / identifying on multiple properties instead of 1 combined with index If speed becomes an issue use the caching logic of the MS UIA framework Add the other patterns later Generalize the concept of System Under Test of starting the SUT (for testing framework purposes) Remote running of scripts Fix issue on finding within dynamic context ... edit august 18th 2013 initial post Only zip files are needed to download , just unzip in 1 directory edit july 2016 Made V0_63 and examples works with AutoIt v3.3.14 Windows 10 tested Simple spy gives some basic code as a present Chrome latest versions seems to be having issues with IUIAutomation on tabs/buttons of mainwindow use MSAA for accessing tabsheets / buttons more cleanup to be in UDF style More comments in the source see changelog.txt for previous changes edit september 2017 All examples fixed for the IE, Firefox and Chrome browser Some small but essential fixes in UIAWrappers edit april 2018 Enhanced logic on fallback / dynamic search, still not perfect, to slow Retested with latest Chrome, FF, Edge and IE11 and some extensions to show how to get text from the webpage (examples 5,6,7) Some small bugfixes Some comments as given in forum incorporated edit may 2019 Speed enhancements on especially fallback searching UIA.CFG works now in a better way to turn on/off debug, highlighting, debug2file More stable and consistent behavior Internal cleanup and refactoring of bigger functions Checked with W10 (not tested on W7) Added some W10 properties Run with 3.3.14.5 on W10 UIA_V0_51.zip EXAMPLES_V0_5.zip UIA_V0_63.zip EXAMPLES_V0_63.zip UIA_V0_64.zip EXAMPLES_V0_64.zip EXAMPLES_V0_66.zip UIA_V0_66.zip EXAMPLES_V0_70.zip UIA_V0_70.zip
    1 point
  3. Not sure this is helpful to someone other than me ... #include <GUIConstantsEx.au3> #include <GuiIPAddress.au3> #include <WindowsConstants.au3> #include <WinAPISys.au3> Local $hGui = GUICreate("IP Address Control Enable/Disable Example", 400, 300) Local $hIPAddress1 = _GUICtrlIpAddress_Create($hGui, 10, 10) Local $hIPAddress2 = _GUICtrlIpAddress_Create($hGui, 10, 40) Local $hIPAddress3 = _GUICtrlIpAddress_Create($hGui, 10, 70) _GUICtrlIpAddress_Set($hIPAddress1, "192.168.1.10") _GUICtrlIpAddress_Set($hIPAddress2, "255.255.255.0") _GUICtrlIpAddress_Set($hIPAddress3, "192.168.1.1") _GUICtrlIpAddress_Disable($hIPAddress1, 1) _GUICtrlIpAddress_Disable($hIPAddress2, 7) ; 4 + 2 + 1 _GUICtrlIpAddress_Disable($hIPAddress3, 0xf) ; 8 + 4 + 2 + 1 GUISetState() While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop WEnd ; #FUNCTION# ==================================================================================================================== ; Name ..........: _GUICtrlIpAddress_Disable ; Description ...: Disable (grays-out) the specified fields of an IP Address control ; Syntax ........: _GUICtrlIpAddress_Disable($hWnd[, $iFields = 0]) ; Parameters ....: $hWnd - Handle to the control ; $iFields - Fields to enable/disable. Can be a combination of the following : ; 0 : Enable all fields ; 1 : Disable the first field ; 2 : Disable the second field ; 4 : Disable the third field ; 8 : Disable the fourth field ; Return values .: On success1 - 1 ; On failure - 0 and set @error to non zero value ; Author ........: jguinch ; =============================================================================================================================== Func _GUICtrlIpAddress_Disable($hWnd, $iFields = 0) Local $aFields[4], $n = 0, $hEdit If Not IsInt($iFields) Or $iFields < 0 Or $iFields > 15 Then Return SetError(3, 0, 0) Local $hWindow = _WinAPI_GetAncestor($hWnd) If @error Then Return SetError(1, 0, 0) If Not $hWindow Or Not WinExists($hWnd) Then Return SetError(2, 0, 0) Local $aFields = _WinAPI_EnumChildWindows ($hWnd, False) If @error Or $aFields[0][0] <> 4 Then Return SetError(1, 0, 0) If $iFields = 0xf Then Return ControlDisable($hWindow, "", $hWnd) Local $iRet = ControlEnable($hWindow, "", $hWnd) For $i = 0 to 3 $iRet *= ( BitAND($iFields, 2 ^ $i) ? ControlDisable($hWindow, "", $aFields[4 - $i][0]) : ControlEnable($hWindow, "", $aFields[4 - $i][0]) ) Next Return $iRet EndFunc
    1 point
  4. Ok I see your point, thanks for correcting my.
    1 point
  5. @mLipok if you search the forum you will find a number of posts where we have assisted users with migrating scripts from AHK to AutoIt, just the same as we would help them migrate from Batch files, VBS, etc. The ability to help is not the issue, and was definitely not the point Jos is making.
    1 point
  6. btw. I'm sure that anybody here, do not know how to convert your AHK script to A3U script, including me EDIT: For example I know how to create AU3 script - but do not know too much about AHK - and do not want to know.
    1 point
  7. BrewManNH

    _ArrayUnique bug?

    You're right of course about the ternary operator. Stupid on my part to not test it. The bug in _ArrayUnique in that line is that it's got the $iColumn and $iBase variables in the wrong places, they're reversed.
    1 point
  8. You do realize your whole message is type IN CAPITAL LETTERS which means you are shouting at us! Secondly, why do you feel you can simply post an AHK sourcecode here and expect somebody to convert that for you without asking any question nor specifying what it is for. You seriously need to consider changing your approach here. Jos
    1 point
  9. czardas

    Switch vs. Select

    Cool analogy, but I think of Switch as a whole guitar and Select as a whole guitar shop. Local $vGuitar = 'more expensive model', $vDuffer = 'cheap guitar', $iDollars = Random(100, 140, 1) Switch $vGuitar Case 'more expensive model' ; get a good quality guitar case Case Else Select Case $vDuffer = 'cheap guitar' And $iDollars <= 120 ; check out the more expensive model Case Else ; pay in installments EndSelect EndSwitch
    1 point
  10. spudw2k

    Switch vs. Select

    No new info here, but I tend to think of it this way. A switch statement acts...like a switch....doy.... Think of a multiple state toggle switch; a pickup selector switch on a guitar makes for a decent example. When the switch is moved, it is evaluated based on the discrete value/condition and outputs as designed/programmed. A select statement could be seen as the whole guitar. If I turn the volume nob, adjust volume output...if I adjust a tuning peg, tighten or loosen string...if I plug in guitar...you get the idea.
    1 point
  11. Ah, it looks like your MySql "STRICT" mode is a bit different from mine. I've included a new management connector, please compile it and replace it like before and see if it fixes the problem. Remmanaut-management connector.au3
    1 point
  12. Hi, im maybe wrong but try that : $text = "[1F010005300020FF]82CD0A[030005300020FF]8177[1F12010000E6300020FF]8178[1F030000300020FF]82F00A8A6F82A682DC82" #include <Array.au3> Func _ArrayAddColumns(ByRef $aArr, $iNumColToAdd = 1) If IsArray($aArr) = 0 Then Return SetError(1, 0, -1) ; Filter out non-array If $iNumColToAdd < 1 Then Return SetError(2, 0, -1) ; $iNumColToAdd must be greater than zero to add a column. If UBound($aArr, 0) > 2 Then Return SetError(3, 0, -1) ; Only allows a 1d or 2d array pass this line. If UBound($aArr, 0) = 1 Then ; ====== For 1d array ======== Local $aRet[UBound($aArr)][$iNumColToAdd + 1] ; Create new 2d array. For $r = 0 To UBound($aArr) - 1 $aRet[$r][0] = $aArr[$r] Next Else ; ======= For 2d array ============ Local $aRet = $aArr ; So that ByRef $aArr is not altered outside of function. ReDim $aRet[UBound($aRet)][UBound($aRet, 2) + $iNumColToAdd] ; ReDim 2d array only. EndIf Return $aRet EndFunc ;==>_ArrayAddColumns $split = StringSplit($text,"[]") _ArrayDisplay($split, "v1") $split = _ArrayAddColumns($split) For $i = 1 To Ubound($split) - 1 $split[$i][1] = BinaryToString("0x" & $split[$i][0]) $i=$i+1 Next _ArrayDisplay($split, "v2") $fill = "" For $i = 2 to Ubound($split) - 1 $fill = $fill & "[" & $split[$i][0] & "]" & $split[$i+1][1] $i=$i+1 Next msgbox(0,"Output",$fill) Edit : $split[$i][1] = BinaryToString("0x" & $split[$i][0], 2);<======= $SB_UTF16LE (2) = binary data is UTF16 Little Endian $split[$i][1] = BinaryToString("0x" & $split[$i][0], 3);<======= $SB_UTF16BE (3) = binary data is UTF16 Big Endian
    1 point
  13. czardas

    Switch vs. Select

    Switch allows syntax like this: Case 1, 3, $x
    1 point
  14. EmilyLove

    Mouse click script

    Global $X = @DesktopWidth / 2 ;The X pixel to click. In this example it will click in the middle of your screen if only have one monitor connected. Global $Y = @DesktopHeight / 2 ;The Y pixel to click. Global $RandomMin = "1000" ;Should always be an integar in milliseconds. Global $RandomMax = "13000" ;Should always be an integar in milliseconds. opt("MouseClickDelay",10);Time in ms between each the Click Up from one click and the Click Down for the next one. opt("MouseClickDownDelay",10);Time in ms between the Click Down and Click Up for the same click. opt("MouseClickDragDelay",250);Time in ms between Click Down and the next command in the script. For $i=1 to 5 ;loops 5 times. Can be a max of 2^32-1 on 32 bit systems or 2^64-1 on 64 bit systems. If you perfer infinite looping, use while 1 wend instead of for next. MouseClick("primary",$X,$Y,1,0);Clicks the primary button (usually left) at $x and $y 1 time at 0 speed (instant) sleep(Random($RandomMin,$RandomMax)) ;sleeps in ms for a random duration between $RandomMin and $RandomMax. Next ;Increments $i by one ($i+=1) and repeats the loop. If the loop goes over 5, the loop stops. ;For additional help, open SciTE and in the menu click Help>Help (Press F1). Note you can click on a function, such as the MouseClick above and then press F1 to get its help file.
    1 point
  15. That's because the forum software was updated and it broke a lot of links, and the user posted that 2 years ago.
    1 point
  16. Maybe you are looking for $WS_EX_TRANSPARENT extented style.
    1 point
  17. Hello. DllCall("UxTheme.dll","LONG","HWND",$YourHWND,"INT",$YourWINDOWTHEMEATTRIBUTETYPE,"ptr",$yourpvAttribute,"dword",$yourcbAttribute) Saludos
    1 point
  18. wakillon

    Mp3SilenceRemover

    Version 1.0.1.6

    757 downloads

    Mp3SilenceRemover can trim a bunch of mp3 files that have silence at the beginnings and ends, automatically. Script scans each file for when the sound starts and ends, by detecting a pre-determined silence threshold, then reencode them without silent parts found. Usefull if you want use mp3 files for a mix or avoid long silences between tracks. Multiple settings are available for preserving mp3 quality. Mp3Gain can be used for avoid a too big difference in sound level between 2 tracks. Main Id3 Tags can be preserved and the fade at end of the track too. Script use : bass.dll, bassenc.dll, bassext.dll, tags.dll, lame.exe and mp3gain.exe.
    1 point
  19. ive been working at swedish and global companys and never ever herd of what u claim? Been working on Ericsson,VolvoIT,Swedish goverment,VMDATA, in CERN and so on. All is useing some kind of remotecontrol software to remote administate machines. That some of the companys useing a conferm window is more to be polite and not to spy on customer, but if cutomer is out of office there are no problem to direct connet and do your job. Besides there are not really any secrets hidden from the system administrators. if u want to keep something secret u HAVE to crypt the files.
    1 point
×
×
  • Create New...