Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/06/2013 in all areas

  1. RTFC

    Code Scanner

    Hi Everyone, This is my first-ever post to this forum, and it's also the first forum I ever joined, after visiting anonymously for some time. I've been very impressed by both the level of expertise and the friendly, helpful, generous, and funny replies to OPs by the large majority of members. My main intention in joining was to share some potentially useful scripts of mine with the community. I've been programming for many years, and since a few months, also in AutoIt. On the other hand, I've no clue about posting stuff, so here goes (fingers crossed): I wrote this one to help solve dependency issues in some larger AutoIt projects of mine, but it should be equally useful for small/simple projects. It's not meant to replace AU3check, but to provide additional info on your project, and identify *possible* runtime issues that the compiler does not pick up. You then have to figure out yourself whether/where/how to change your code. Also be warned that the file I/O is tectonically slow (definitely room for improvement there). Download CodeScanner and associated UDFs in the CodeScannerCrypterBundle. This utility scans an AutoIt code project with multiple #includes and/or UDFs for inconsistencies, clashes, and various other hidden (potential) problems. It also generates MetaCode files for use with CodeCrypter and the MCf library. It does NOT alter your code; it just reads, evaluates, and reports. 36 Optional Outputs (from version 2.0😞 status report (text file), identifying: missing #includes, duplicate UDFs (lists all occurrences with their resp. parameters); issues with global definitions, unresolved function parameters... searchable treeviews of code architecture (nested #includes, nested function calls (UDF + native AUtoIt); detailed stats for each selected branch (who calls X, who is called by X) array listings (some 2-D) of: identified potential issues; unique #includes, redundant #includes; unique UDFs with calling stats; globals; all locations/definitions of UDF func def/endfunc, all calls, all #includes, all globals, all variables, all literal strings, all native AutoIt functions (with parameters) definition list of all globals identified only within UDFs, written out as script for easy inclusion at top of your script (so all globals are predefined in main code) MetaCode files (see the MetaCode thread (esp. the Tutorial) for details: '?do=embed' frameborder='0' data-embedContent>>) all results can be written to text files and read in to other scripts in their original array formats with an additionally supplied small UDF. You can edit the code to add more yourself; I'm gradually extending its functionality as/when required for my own projects. Hope it helps!
    4 points
  2. It's been a year and four-five months. Everyone okay?
    2 points
  3. Hi! Today I want to show you my current AutoIt project: The ISN AutoIt Studio. The ISN AutoIt Studio is a complete IDE made with AutoIt, for AutoIt! It includes a GUI designer, a code editor (with syntax highlighting, auto complete & intelisense), a file viewer, a backup system, trophies and a lot more features!! Here are some screenshots: Here some higlights: -> easy to create/manage/public your AutoIt-projects! ->integrated GUI-Editor (ISN Form Studio 2) ->integrated - file & projectmanager ->auto backupfunction for your Projects ->extendable with plugins! ->available in several languages ->trophies ->Syntax highlighting /Autocomplete / Intelisense ->Dynamic Script ->detailed overview of the project (total working hours, total size...) And much more!!! -> -> Click here to download ISN AutoIt Studio <- <- Here is the link to the german autoit forum where I posted ISN AutoIt Studio the first time: http://autoit.de/index.php?page=Thread&threadID=29742&pageNo=1 For more information visit my Homepage: https://www.isnetwork.at So….have fun with ISN AutoIt Studio! PS: Sorry for my bad English! ^^
    1 point
  4. S3d.au3 This UDF enables you to draw simple 3D graphics. Features: Simple and easy to useDoesn't require external libraries. You don't need OpenGL or DirectX. Available Functions: _S3d_SelectGraphic($hGraphic, $iWidth, $iHeight, $iSmooth = 2) _S3d_SelectPen($hPen) _S3d_SelectBrush($hBrush) _S3d_SelectFont($hFont) _S3d_SelectFormat($hFormat) _S3d_SetClipCount($iCount) _S3d_Dist($nPos1X = 0, $nPos1Y = 0, $nPos1Z = 0, $nPos2X = 0, $nPos2Y = 0, $nPos2Z = 0) _S3d_DistFromCamera($nPosX = 0, $nPosY = 0, $nPosZ = 0) _S3d_SetCamera($nCameraX, $nCameraY, $nCameraZ, $nTargetX, $nTargetY, $nTargetZ, $nVAngle = 0, $nFAngle = 0.8, $nFScale = 1000) _S3d_SetCameraEx($nCameraX, $nCameraY, $nCameraZ, $nXYAngle = 0, $nXZAngle = 0, $nVAngle = 0, $nFAngle = 0.8, $nFScale = 1000) _S3d_SetLocalMatrix($n00 = 1, $n01 = 0, $n02 = 0, $n03 = 0, $n10 = 0, $n11 = 1, $n12 = 0, $n13 = 0, $n20 = 0, $n21 = 0, $n22 = 1, $n23 = 0, $n30 = 0, $n31 = 0, $n32 = 0, $n33 = 1) _S3d_MultiplyLocalMatrix($n00 = 1, $n01 = 0, $n02 = 0, $n03 = 0, $n10 = 0, $n11 = 1, $n12 = 0, $n13 = 0, $n20 = 0, $n21 = 0, $n22 = 1, $n23 = 0, $n30 = 0, $n31 = 0, $n32 = 0, $n33 = 1, $fRefresh = True) _S3d_LocalTranslate($nX, $nY, $nZ, $fRefresh = True) _S3d_LocalScale($nX, $nY, $nZ, $fRefresh = True) _S3d_LocalRotateX($nAngle, $fDeg = False, $fRefresh = True) _S3d_LocalRotateY($nAngle, $fDeg = False, $fRefresh = True) _S3d_LocalRotateZ($nAngle, $fDeg = False, $fRefresh = True) _S3d_GetLocalMatrix() _S3d_SetLocalMatrixEx(ByRef $aMatrix) _S3d_GetPos($nX, $nY, $nZ) _S3d_InitCurrentPos() _S3d_MoveTo($nX, $nY, $nZ = Default) _S3d_Clear($nColor = 0xFF000000) _S3d_Line($nX1, $nY1, $nZ1, $nX2, $nY2, $nZ2) _S3d_LineTo($nX, $nY, $nZ) _S3d_Box($nX1, $nY1, $nZ1, $nX2, $nY2, $nZ2) _S3d_Arrow($nX1, $nY1, $nZ1, $nX2, $nY2, $nZ2, $nLen = 30, $nAngle = 0.6) _S3d_Circle($nX, $nY, $nZ, $nRad, $fFill = False) _S3d_Polygon($aPoints, $fFill = False) _S3d_RegPolygon($nX, $nY, $nZ, $nRad, $iNum, $fFill = True) _S3d_Star($nX, $nY, $nZ, $nRad1, $nRad2, $iNum, $fFill = True) _S3d_Square($nX1, $nY1, $nZ1, $nX2, $nY2, $nZ2, $nX3, $nY3, $nZ3, $nX4, $nY4, $nZ4, $fFill = True) _S3d_MoveTo2($nXL, $nYL, $nZL, $nXR, $nYR, $nZR) _S3d_RibbonTo($nXL, $nYL, $nZL, $nXR, $nYR, $nZR) _S3d_String($sString, $nX, $nY, $nZ) New version!S3d.zip v1.3.1 (09/JUN/2014) * Archives S3d.zip v1.3.0 (05/SEP/2013) S3d.zip v1.2.3 (16/AUG/2013) Enjoy!
    1 point
  5. QlikView - Data Visualisation Tool This powerfull Data Visualisation Tool, has an extensive COM object Model to control the application QlikView Examples The good news is they have a free fully functional working version for personal use. Free Download This will get you started. $oMyError = ObjEvent("AutoIt.Error","MyErrFunc") $Qview = ObjCreate("QlikTech.QlikView") if IsObj($Qview) Then MsgBox(0,"",$Qview.OSName & " " &$Qview.OSVersion) Else MsgBox(0,"","NOK") EndIf $Qview.MsgBox("QlikView Version " & $Qview.QvVersion ) $Qview.OpenDoc("C:\QlikView\SALES per Region.qvw") WinSetState("QlikView", "", @SW_MAXIMIZE) $ActiveDoc = $Qview.ActiveDocument ; INSERT HERE and start every call with "QvDoc." $Sheet = $ActiveDoc.ActivateSheet("Sales By Region - YTD") $Sheet.FitZoomToWindow ConsoleWrite($ActiveDoc.GetVariable("vCurrentYear") & @CRLF) ConsoleWrite($ActiveDoc.GetPathName & @CRLF) ;$Qview.Quit Func MyErrFunc() $HexNumber=hex($oMyError.number,8) Msgbox(0,"COM Test","We intercepted a COM Error !" & @CRLF & @CRLF & _ "err.description is: " & @TAB & $oMyError.description & @CRLF & _ "err.windescription:" & @TAB & $oMyError.windescription & @CRLF & _ "err.number is: " & @TAB & $HexNumber & @CRLF & _ "err.lastdllerror is: " & @TAB & $oMyError.lastdllerror & @CRLF & _ "err.scriptline is: " & @TAB & $oMyError.scriptline & @CRLF & _ "err.source is: " & @TAB & $oMyError.source & @CRLF & _ "err.helpfile is: " & @TAB & $oMyError.helpfile & @CRLF & _ "err.helpcontext is: " & @TAB & $oMyError.helpcontext _ ) SetError(1) ; to check for after this function returns Endfunc
    1 point
  6. BinaryBrother

    Detect Antivirus

    I couldn't find a satisfactory example on the forums, mainly because the interface that I'm using is undocumented and MS wants to keep it that way. This is the first revision of this example. I just wanted to post it while I had time to give other users a better starting point. Only works on Vista+, only gets first instance of AV found. If nobody cleans this up, I'll come back in a few days and post the finished product. Windows XP has an interface [/root/SecurityCenter], but I don't need it. This returns an $Array[4] with the below information. Console: Current AV: Microsoft Security Essentials State: Enabled pathToSignedProductExe: C:\Program Files\Microsoft Security Client\msseces.exe pathToSignedReportingExe: C:\Program Files\Microsoft Security Client\MsMpEng.exe Func _GetAVInfo() Dim $lArray[4] $oWMI = ObjGet("winmgmts:\\localhost\root\SecurityCenter2") $colItems = $oWMI.ExecQuery("Select * from AntiVirusProduct") For $objAntiVirusProduct In $colItems $lArray[0] = $objAntiVirusProduct.displayName $lArray[1] = $objAntiVirusProduct.productstate $lArray[2] = $objAntiVirusProduct.pathToSignedProductExe $lArray[3] = $objAntiVirusProduct.pathToSignedReportingExe Next Dim $AvStatus = Hex($lArray[1]) If StringMid($AvStatus, 5, 2) = "10" Or StringMid($AvStatus, 5, 2) = "11" Then $lArray[1] = "Enabled" ElseIf StringMid($AvStatus, 5, 2) = "00" Or StringMid($AvStatus, 5, 2) = "01" Then $lArray[1] = "Disabled" EndIf Return $lArray EndFunc ;==>_GetAVInfo Resources: http://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/bd97d9e6-75c1-4f58-9573-9009df5de19b/security-center-api http://social.msdn.microsoft.com/Forums/en-US/6501b87e-dda4-4838-93c3-244daa355d7c/wmisecuritycenter2-productstate http://screen317.spywareinfoforum.org/ http://neophob.com/2010/03/wmi-query-windows-securitycenter2 Another method to check for Antivirus/Firewall status http://chentiangemalc.wordpress.com/2013/04/09/accessing-windows-security-centre-status-from-powershell/ http://msdn.microsoft.com/en-us/library/bb432509(VS.85).aspx
    1 point
  7. thank you thank you! this is the piece of info i was looking for. this is very helpful. my script wouldnt be possible without your UDF so for that, i thank you
    1 point
  8. That's such a deeply twisted distortion of my stated "primary objection" that it's unrecognizable. My objection is that Autoit becomes unmanageable and eventually a POS when you start unnecessarily cramming the kitchen sink into functions. I'm happy to let the thread die if you psychoanalysts are through.
    1 point
  9. Gianni

    exe log or app mon

    hi mesale0077 >this udf might interest you among other things you can find functions like this: ; _ProcessGetTimes (); Returns Process Creation, Exit, Kernel / User-mode Times [<_WinTimeFunctions.au3> is helpful here) and other assortments...
    1 point
  10. UEZ

    exe log or app mon

    This might be helpful: #Include <Date.au3> #Include <WinAPIEx.au3> Opt('MustDeclareVars', 1) Global $aFT, $tFT, $tST, $ID = ProcessExists('SciTE.exe') If $ID Then $aFT = _WinAPI_GetProcessTimes($ID) $tFT = _Date_Time_FileTimeToLocalFileTime(DllStructGetPtr($aFT[0])) $tST = _Date_Time_FileTimeToSystemTime(DllStructGetPtr($tFT)) ConsoleWrite('SciTE was run at: ' & _WinAPI_GetTimeFormat(0, $tST) & @CR) EndIfYou can get all processes you want, convert it with function and write it to a log file. The "stopped" time you can add when the PID doesn't exist anymore. Slm, UEZ
    1 point
  11. I guess my next question is this: why does a recursive file list to array hold such a firm footing on the rock that is your heart? Were you trying to use it as a way to make yourself known as a clever if not spiffy coder? Dreams which were smashed on the rocky shore when your contributions were the last to appear on the rolling credits?
    1 point
  12. As I told you the last time you asked about nesting: The browser works with a DOM (Document Object Model). IE exposes the DOM API through COM. Both the Internet Explorer window and each frame are a "document container" - each document has it's own DOM. To get to objects in other documents, you must set up a new DOM context (you must drill into nested documents). For the most part, IE.au3 and the DOM treat iFrames and Frames the same. So, if your structure above is accurate, the following should give you references to the two input objects: $oFrame1 = _IEFrameGetObjByName($oIE, "Main") $oFrame2 = _IEFrameGetObjByName($oFrame1, "middle") $oFrame3 = _IEFrameGetObjByName($oFrame2, "contents") $oForm = _IEFormGetObjByName($oFrame3, "edits") $oInput1 = _IEFormElementGetObjByName($oForm, "desc") $oInput2 = _IEFormElementGetObjByName($oForm, "btnCreate") Note, you can also replace the last 3 lines with these two: $oInput1 = _IEGetObjByName($oFrame3, "desc") $oInput2 = _IEGetObjByName($oFrame3, "btnCreate") Note that is you use the last code snippet, if there is more than one object by that name on the page, you may get the wrong one (you'll get the first one in object order unless you use the optional index parameter). Dale
    1 point
  13. Something like this? Edit: Run 11-Mouse.au3 in the zip instead of this. #include <GUIConstantsEx.au3> #include <S3d.au3> Opt("MouseCoordMode", 0) ; relative coords to the active window Global Const $PI = 3.1416 Main() Func Main() ; Create a window and initialize GDI+ Local $hGUI = GUICreate("Mouse Test", 650, 550) GUISetState() _GDIPlus_Startup() Local $hGraphics = _GDIPlus_GraphicsCreateFromHWND($hGUI) Local $hBitmap = _GDIPlus_BitmapCreateFromGraphics(650, 550, $hGraphics) Local $hGraphic = _GDIPlus_ImageGetGraphicsContext($hBitmap) Local $hBrush = _GDIPlus_BrushCreateSolid(0x996699FF) _S3d_SelectBrush($hBrush) ; Select a Graphic object ; width = 650, height = 550 _S3d_SelectGraphic($hGraphic, 650, 550) Local $iX = 0, $iY = 0 ; Loop until user exits Do ; Clear the Graphics object _S3d_Clear(0xFF333333) ; Set camera ; Camera : (0, 0, 150) ; $nXYAngle = $i (rad) ; $nXZAngle = 0.5 * Sin($i) (rad) _S3d_SetCameraEx(0, 0, 150, $iX, $iY) Local $k For $j = 0 To $PI * 2 Step $PI * 2 / 6 $k = $j + $PI / 6 ; $j + $PI * 2 / 12 _S3d_Square(1000 * Cos($j), 1000 * Sin($j), 0, _ 1000 * Cos($j), 1000 * Sin($j), 300, _ 1000 * Cos($k), 1000 * Sin($k), 300, _ 1000 * Cos($k), 1000 * Sin($k), 0) Next ; Copy to the window _GDIPlus_GraphicsDrawImage($hGraphics, $hBitmap, 0, 0) $iX += (MouseGetPos(0) - 275) * 0.00005 $iY += (MouseGetPos(1) - 325) * 0.00005 ; Limit value of $iY If $iY < -0.5 Then $iY = -0.5 ElseIf $iY > 0.5 Then $iY = 0.5 EndIf Sleep(30) Until GUIGetMsg() = $GUI_EVENT_CLOSE ; Clean up resources _GDIPlus_BrushDispose($hBrush) _GDIPlus_GraphicsDispose($hGraphic) _GDIPlus_BitmapDispose($hBitmap) _GDIPlus_GraphicsDispose($hGraphics) _GDIPlus_Shutdown() GUIDelete($hGUI) EndFunc ;==>Main
    1 point
  14. Ascend4nt

    MIDI UDF

    MIDIEx UDF Okay, enough time sitting on this. Here's the new MIDIEx UDF package, consisting of three modules: MIDIFunctions.au3: This was the midiudf that Eynstyne created, except with all the fixes and adjustments made to it over time, plus the new functions that are still listed in a >prior post for MidiExTest. MIDIConstants.au3: This has all the Constants that were originally part of the midiudf, but without the incorrect NoteOn/Off message constants. It additionally has these new constants: MIDI Instruments constants MIDI Note Constants (not NoteOn/Off, but note value) DRUM (Percussion) Instrument Constants Channel Constants Controller Message Constants MidiExTest - the same basic UDF in the >previous post, but stripped of Constants and functions that are now part of the other two modules Here's MidiExTest as it is now, with proper includes and all. It's a lame example, but from this much can be done. There's plenty of examples of the midiudf that can easily be ported to this by adjusting the way Note messages are sent. ; ==================================================================================================== ; <MidiExTest.au3> ; ; Tests of the 'Extra' functionality of the new improved (and fixed) MIDI UDF ; ; Author: Ascend4nt ; ==================================================================================================== #include "MIDIFunctions.au3" #include "MIDIConstants.au3" ; Open MIDI Out $hMidiOut = _midiOutOpen(0) If @error Then ConsoleWrite("_MidiOutOpen error:"& @error & ", @extended = " & @extended & @CRLF) Exit EndIf $nMidiDevices = _MidiOutGetNumDevs() ConsoleWrite(" # Devices: " & $nMidiDevices & @CRLF) ; MIDI Devices are indexed 0 through #devices minus 1 For $i = 0 To $nMidiDevices - 1 $aCaps = _MidiOutGetDevCaps($i) ConsoleWrite("Caps Dev #"&$i&": [0] = " & $aCaps[0] & _ ; Manufacturer ID ", [1] = " & $aCaps[1] & _ ; Product ID ", [2] = " & $aCaps[2] & _ ; Driver Version ", [3] = " & $aCaps[3] & _ ; Name ", [4] = " & $aCaps[4] & _ ; If 1, then 'MOD_MIDIPORT' or MIDI Hardware Port ", [5] = " & $aCaps[5] & _ ; # of Voices (0 for Hardware Ports) ", [6] = " & $aCaps[6] & _ ; # Simultaneous Notes (0 for Hardware Ports) ", [7] = " & $aCaps[7] & _ ; Channel mask (0xFFFF = all 16 ports) ", [8] = " & $aCaps[8] &@CRLF) ; Optional Functionality Next #cs MidiSetInstrument($hMidiOut,1, 1) NoteOn($hMidiOut, 0x3C, 1, 127) Sleep(1500) ;~ NoteAfterTouch($hMidiOut, 0x3C, 1, 88) NoteOn($hMidiOut, 0x3C, 1, 127) MsgBox(0, "Aftertouched?", "AfterTouched") NotesAllOff($hMidiOut,1) #ce ; Set 3 Different Instruments to 3 different Channels: MidiSetInstrument($hMidiOut, $INSTR_StringEnsemble1, $MIDI_CHANNEL_1) MidiSetInstrument($hMidiOut, $INSTR_ChoirAhh, $MIDI_CHANNEL_2) MidiSetInstrument($hMidiOut, $INSTR_FXEchoDrops, $MIDI_CHANNEL_3) ; String Ensemble, Channel 1 NoteOn($hMidiOut, $NOTE_C4, 1, $MIDI_MAX_VALUE) ; C4 (Middle C) ; Set Pan - extreme Left MidiControlChange($hMidiOut, $MIDI_CONTROL_PAN, 0) MsgBox(0,"String (Left)","String on Left") ; Pan Left to Right For $i = 0 To 127 MidiControlChange($hMidiOut, $MIDI_CONTROL_PAN, $i) Sleep(10) Next MsgBox(0,"Panned Left To Right", "Panned Left to Right") ; Pan Center MidiControlChange($hMidiOut, $MIDI_CONTROL_PAN, $MIDI_CENTER_VALUE) ; Modulation none - max For $i=0 To 127 MidiControlChange($hMidiOut, $MIDI_CONTROL_MODULATE, $i) Sleep(10) Next MsgBox(0,"Modulated", "Modulated 0 to 127") MidiControlChange($hMidiOut, $MIDI_CONTROL_MODULATE, 0) ; Channel Volume max - min For $i= 127 To 0 Step -1 MidiControlChange($hMidiOut, $MIDI_CONTROL_CHANNEL_VOLUME, $i) Sleep(20) Next MsgBox(0,"Volume Adjusted", "Volume Adjusted high-to-low") MidiControlChange($hMidiOut, $MIDI_CONTROL_CHANNEL_VOLUME, $MIDI_MAX_VALUE) ; Sustain - This will continue keeping notes pressed even after 'release' ; (meaning after turning off the notes) MidiControlChange($hMidiOut, $MIDI_CONTROL_SUSTAIN_PEDAL, $MIDI_MAX_VALUE - 27) ;~ NoteOff($hMidiOut, $NOTE_C4, 1) NotesAllOff($hMidiOut, 1) MsgBox(0,"Sustained","Sustained After NoteOff") MidiControlChange($hMidiOut, $MIDI_CONTROL_SUSTAIN_PEDAL, $MIDI_MIN_VALUE) MsgBox(0,"Sustain Off","Sustain OFF") NoteOn($hMidiOut, $NOTE_C4, 1, $MIDI_MAX_VALUE) #cs For $i=0 To 127 MidiControlChange($hMidiOut, 0x08, $i) Sleep(10) Next MsgBox(0,"Balanced?", "Balance 0 to 127") #ce ; Choir Aah, Channel 2 NoteOn($hMidiOut, $NOTE_C3, 2, $MIDI_MAX_VALUE) ; FX Echo Drops, Channel 3 NoteOn($hMidiOut, $NOTE_C5, 3, $MIDI_CENTER_VALUE) ; Percussion Instrument (Channel 10) ;~ NoteOn($hMidiOut, $DRUMS_AcousticBassDrum, 10, 127) PercussionOn($hMidiOut, $DRUMS_AcousticBassDrum, $MIDI_MAX_VALUE) MsgBox(0,"ALL", "ALL") ; Percussion Instrument OFf ;~ NoteOff($hMidiOut, 35, 10) PercussionOff($hMidiOut, 35) ;~ NoteOn($hMidiOut, $DRUMS_AcousticSnare, 10) PercussionOn($hMidiOut, $DRUMS_AcousticSnare) ; String Ensemble - C4 Off ;~ NoteOff($hMidiOut, 0x3C) NotesAllOff($hMidiOut) MsgBox(0,"NoString", "NoString") ; Percussion Instrument Off ;~ NoteOff($hMidiOut, 38, 10) PercussionOff($hMidiOut, 38) ; Choir Aah, ch. 2, C3 Off ;~ NoteOff($hMidiOut, 0x30, 2) NotesAllOff($hMidiOut, 2) MsgBox(0,"NoChoirAhh", "NoChoirAhh") ; FX Echo Drops, ch. 3, C5 Off ;~ NoteOff($hMidiOut, 0x48, 3) NotesAllOff($hMidiOut, 3) MsgBox(0,"NONE", "SILENCE!") ; Pitch-Bend Tests NoteOn($hMidiOut, 0x3C - 12) MsgBox(0,"Pitch-Default", "Pitch-Default") #cs For $i = 1 To 8192*2-1 Step 4 MidiPitchBend($hMidiOut, $i, 1) Next #ce MidiPitchBend($hMidiOut, $MIDI_PITCH_BEND_MAX, 1) MsgBox(0,"Pitch-bended", "Pitch-bended") ;~ MidiPitchBend($hMidiOut, $MIDI_PITCH_BEND_CENTER, 1) MidiResetControllers($hMidiOut) MsgBox(0,"Pitch-Reverted","Reverted Pitch") NotesAllOff($hMidiOut, 1) MIDIExUDF.zip
    1 point
  15. I am not going to test that as I know that the syntax is incorrect. The "1" is not part of the function parameter but a comparison value for testing with the function return value. Perhaps my adding String() initially confused you to change it and to make this error. So if you have .Net client installed then run this one line code in a script. If RegRead("HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Client", "Install") = "1" Then MsgBox(4, "mybox", "w00t") The value of "install" is in the "Client" key as well as the "1033" key so use the "Client" key to avoid the concern of needing the Locale ID. My error for not seeing this before. As an alternative to registry, you can use AdlibEnableRegister() to call a function periodically to see if the .Net Client windows exist and if exist then handle them with your ControlClicks. You asked about a file test. Do you know of a file that is v4 .Net Client only? I am not sure if this could be reliable enough. As with attempts with reading the registry, you still have .Net Client windows showing. Sure, you seem to be reading the registry incorrect, but still the source of the problem is handling the unexpected windows. You make the choice, people are here to help you with your choice.
    1 point
  16. Gianni

    Setting up a Queuing System

    ...... I would recommend this small reading.....
    1 point
  17. Gianni

    working with combobox

    could you try $result = _ImageSearch("cpu.bmp",1,$x1,$y1,100) instead of $result = _Imagesearcharea("cpu.bmp",1,0,0,@DesktopWidth,@DesktopHeight,$x1,$y1,100)
    1 point
  18. Actually, this is a more reliable way to verify, and how I usually do it... Instead of: If @error = 0 Then I use: If $Value = "Microsoft .NET Framework 4 Extended" Then Of course, changing what you are specifically looking for per application name or version on the right-side of the equal sign (=).
    1 point
  19. Yes, because of this statement: guictrlsetlimit(-1,1) Good Luck, please consider my suggestion to read the gui management sections of the Help file. It would be worthwhile to spend an hour going through either piece of code and making sure that you understand what each statement is doing. kylomas
    1 point
  20. Ascend4nt: First, i need to say something to you: Thanks!! A lot!! In the last week i was looking for a script that show me the IPv4 of a PC in a Windows BOX. i do it before using cmd/bat and compiling to an .exe file. But i was looking for a simple script in vbs or something like that. But later i finded AUTOIT searching with google and reading this thread. I start reading, a lot of tutorials, the help, etc... and i enter to this world of Autoit and now im very happy. I downloaded, and in doing test and programming (but with old knowledge, because 20 years ago i do basic and pascal only, and right now i dont remember almost nothing of that languages). I do my first simple script with AutoIt that shows common data for a PC (name, username, disk free space, Ip, etc).. and right now i want to put your script as a button in my little Pc Information tool. Right now i have problems, because you have a function in your example script and i put your script into mine as a function. So the ESC for exit doesn't work. The button works fine, and trigger your example anyways. I will continue to looking and reading, etc, so i will learn more and more and i will fix this little problem that i have, but i need to said thanks to you. Maybe sounds lame, but you give me, testing with your script, the push that i need to start programming and using Autoit, Koda, Scite and a lot more. Thanks a lot and sorry for my english, I have only three days with Autoit, but its seams wonderfull to use.
    1 point
  21. well, f*k me, I guess I like a good challenge. Here's a UDF for finding processes that started after a given time point: ; ======================================================================================================== ; <_ProcessListAfterTimePoint.au3> ; ; Functions to get an array of processes that started after a given time point ; Example included displays array of processes ; ; Functions: ; _WinTime_GetSystemTimeAsLocalFileTime() ; Gets current time as 64-bit FILETIME (_WinTimeFunctions UDF) ; _ProcessListAfterTime() ; Gets list of processes after a certain timepoint (as FILETIME) ; ; Author: Ascend4nt ; ======================================================================================================== #include <WinAPI.au3> ; ProcessOpen/CloseHandle ; ============================================================================================== ; Func _WinTime_GetSystemTimeAsLocalFileTime() ; ; Function to grab the current system time as 64bit Local FileTime (not UTC) ; (from _WinTimeFunctions UDF) ; ; Return: ; Success: 64-bit value representing the UTC-based FileTime ; Failure: -1, with @error set: ; @error = 2 = DLL Call error, @extended = actual DLLCall error code ; ; Author: Ascend4nt ; ============================================================================================== Func _WinTime_GetSystemTimeAsLocalFileTime() Local $aRet=DllCall("kernel32.dll","none","GetSystemTimeAsFileTime","uint64*",0) If @error Then Return SetError(2,@error,-1) Return $aRet[1] EndFunc ; ============================================================================================== ; Func _ProcessListAfterTime($nSysTime, $vProcFilter = "") ; ; Returns an array of Processes that started after a given time point (as FILETIME) ; ; $nSysTime = a 64-bit FILETIME value (see GetSystemTimeAsFileTime) to use ; as the starting point ; ; $vProcFilter = Process name filter ("calc.exe") or "" for ALL processes ; ; Returns: ; Success: An array of processes in the same form as ProcessList: ; [0][0] = # of processes ; [i][0] = Process name ; [i][1] = Process ID # ; ; Failure: "" with @error set (only happens if ProcessList() itself fails) ; ; ; Author: Ascend4nt ; ============================================================================================== Func _ProcessListAfterTime($nSysTime, $vProcFilter = "") Local $aProcList, $aFoundList, $nFound Local $iAccess, $hProcess If $vProcFilter = "" Then $aProcList = ProcessList() Else $aProcList = ProcessList($vProcFilter) EndIf If @error Then Return SetError(@error,0,"") ; XP, XPe, 2000, or 2003? - Affects process access requirement If StringRegExp(@OSVersion,"_(XP|200(0|3))") Then $iAccess = 0x0400 ; PROCESS_QUERY_INFORMATION Else $iAccess = 0x1000 ; PROCESS_QUERY_LIMITED_INFORMATION EndIf Dim $aFoundList[$aProcList[0][0]+1][2] $nFound = 0 For $i = 1 To $aProcList[0][0] $hProcess = _WinAPI_OpenProcess($iAccess, False, $aProcList[$i][1]) $aRet = DllCall("kernel32.dll", "bool", "GetProcessTimes", "handle", $hProcess, "uint64*", 0, "uint64*", 0, "uint64*", 0, "uint64*", 0) If Not @error And $aRet[0] And $aRet[2] > $nSysTime Then ConsoleWrite("Found process that started after timepoint: " & $aProcList[$i][0]&", PID #" & $aProcList[$i][1] & @CRLF) $nFound += 1 $aFoundList[$nFound][0] = $aProcList[$i][0] $aFoundList[$nFound][1] = $aProcList[$i][1] EndIf _WinAPI_CloseHandle($hProcess) Next $aFoundList[0][0] = $nFound ReDim $aFoundList[$nFound + 1][2] Return $aFoundList EndFunc ; --- EXAMPLE USAGE --- #include <Array.au3> Local $nSysTime, $aProcList $nSysTime = _WinTime_GetSystemTimeAsLocalFileTime() Sleep(10) ; Some systems may need a small sleep (see MichaelIslamet's posts) Run("calc.exe") Run("notepad.exe") Sleep(500) $aProcList = _ProcessListAfterTime($nSysTime) _ArrayDisplay($aProcList, "Processes that started after start point") In michaelslamet's case, call it like _ProcessListAfterTime($nSysTime, "iexplore.exe"). *edit: Added Sleep(10) after getting the System Time. May or may not be system-specific issue (see >MichaelIslamet's post)
    1 point
  22. jchd, Yes, good question. Personally I think there is little benefit. But I surely would like experimenting with Binary Large Objects first (I didn't touch the topic yet), and make my conclusions afterwards GreenCan PS. A bit off topic but FYI, Aqua Data Studio 13 now natively supports SQLite
    1 point
  23. ProgAndy, Best ask Valik - from the tone of the Trac ticket the problem is too deeply buried in the core code to be changed easily or he would have done so. And I know that there are sections of that core code that Jon has marked "Here be dragons"! M23
    1 point
×
×
  • Create New...