Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/06/2015 in all areas

  1. This is my modification of the editor based on SciTE 3.2.5.99. Too many changes are made. Added new plugins (.lua) and rewrited existing, added Toolbar and Sidebar, expanded main and context menu, and more... I will not list all the changes, just download and try it. I also want to say a big thank the staff of Ru-Board for the excellent work on the modification of the editor and writing great plugins (.lua). Compiler Wrapper (CW) - a new tool that is part of SciTE 3.2.5.99 and designed to replace the AutoItWrapper. CW only works with "pragma" directives and does not use "AutoIt3Wrapper" directives. CW differs from AutoItWrapper both externally and internally but has a similar logic. Here are some possibilities utility - more friendly GUI, all options of "pragma" directives are located in one window, the ability to add digital signature, and a simple way to add resources (.rcs and .res files). The current version of CW is compatible with AutoIt 3.3.10.x, 3.3.12.x, and 3.3.14.x. How to install? Unpack CW to Compiler Wrapper folder and copy it to your SciTE or SciTE\Tools directory. Note that if you download SciTE 3.2.5.99 then you need not do anything because CW is already installed in the package. Command lines for SciTE: #Command line for compilation command.compile.au3="$(SciteDefaultHome)\Compiler Wrapper\CW.exe" "$(FilePath)" /m:1 /c:0 command.compile.subsystem.au3=1 #Command line for building (without GUI) command.build.au3="$(SciteDefaultHome)\Compiler Wrapper\CW.exe" "$(FilePath)" /m:1 /c:0 /s:1 command.build.subsystem.$(au3)=1 #Command line for changing "pragma" options only command.90.au3="$(SciteDefaultHome)\Compiler Wrapper\CW.exe" "$(FilePath)" /m:2 command.name.90.au3=Compiler Options... command.shortcut.90.au3=Shift+F7 command.subsystem.90.au3=1 command.save.before.90.au3=1 Command lines for Windows Explorer context menu: ;Command line for compilation "C:\Program Files (x86)\SciTE\Tools\Compiler Wrapper\CW.exe" "%1" /m:0 /c:0 ;Command line for building (without GUI) "C:\Program Files (x86)\SciTE\Tools\Compiler Wrapper\CW.exe" "%1" /m:0 /c:0 /s:1 Screenshots Files to download You can download latest SciTE build on this page (bottom of the post) or by using the SciTE Updater.
    3 points
  2. JLogan3o13

    Windows Firewall UDF

    I dug this UDF out in response to a request in the General Help forum. There is still some tidying to do, but I thought I would post here for anyone that would benefit. All functions have been tested on both XP and Windows 7. Updated January 22, 2014: Tested on XP, WIN7 and WIN8.1, x86 and x64 Current version includes: Enable or Disable the Windows Firewall Add or Remove Authorized Applications to the Exclusions list Add or Delete Ports from the Exclusions list. Enable or Disable the use of Exceptions Enable or Disable Notifications of blocked applications Enable or Disable Existing Ports List all Applications in the Exclusions List List all Ports in the Exclusions List List Properties of the current Firewall Configuration Restore the Windows Firewall to its default configuration Windows Firewall.au3
    1 point
  3. Menu: ToolsAdvancedAuto Show Autocomplete Menu: ToolsAdvancedAuto Show Calltips
    1 point
  4. Jos

    Bots

    Think this was made clear already and would appreciate when you know when to simply shut up and not to butt in! Jos
    1 point
  5. pcjunki

    Shutdown Script

    read and understood
    1 point
  6. Looks like your last line is inverted Edit... oops sry didn't look at it close enough... one second. ; Open a browser to the basic example, get an object reference ; to the DIV element with the ID "line1". Display the innerText ; of this element to the console. #include <IE.au3> #include <MsgBoxConstants.au3> Local $oIE = _IE_Example("basic") Local $oDiv = _IEGetObjById($oIE, "line1") MsgBox($MB_SYSTEMMODAL, "Line1", $oDiv.innertext)
    1 point
  7. three equations with three unknown... no need to bruteforce c = (z+y-x)/2 = 340/2 = 170 b = y-c = 200-170 = 30 a = x-b = 100-30 =70 less then one minute...without any computer
    1 point
  8. ? #include <File.au3> $source = @DesktopDir & "\test.au3" $myfolder = @DesktopDir & "\testdir\" $dest = $myfolder & "\test.au3" _myFileMove($source, $dest) Func _myFileMove($sSource, $sDestination) Local $sDrive = "", $sDir = "", $sFilename = "", $sExtension = "" Local $aPathSplit = _PathSplit($sDestination, $sDrive, $sDir, $sFilename, $sExtension) Local $iNum, $newfile = $sDestination While FileExists($newfile) $iNum += 1 $newfile = $sDrive & "\" & $sDir & "\" & $sFilename & " (" & $iNum & ")" & $sExtension Wend If FileMove($sSource, $newfile, 8) Then Return 1 EndFunc
    1 point
  9. water

    Bots

    The start value of $Testing is higher than the ending condition of 3. Change line Until $Testing = 3 to Until $Testing >= 3
    1 point
  10. water

    mysterious $i & $h

    I have already started and copied some text from Wikipedia which should give new users a better understanding. I have fixed the default values for newly defined variables and modified the table header from "initialization" to "examples". I would prefer to have real examples not just the prefixes used in this column.
    1 point
  11. Was that a request, a demand, or a question? Anyway, I just happened to have wrote something like this last week... lucky you. _myFileMove(@DesktopDir & "\test.au3", @DesktopDir & "\test.au3.bak", 16) Func _myFileMove($sSource, $sDestination, $iFlag = 0) ; $iFlag; $FC_NOOVERWRITEENUM = 16 ... This doesn't exist, so magic numbers are used Local $iRet If Not (BitAND($iFlag, 16) = 16) Then $iRet = FileMove($sSource, $sDestination, $iFlag) Return SetError(@error, @extended, $iRet) EndIf $iFlag = BitXOR($iFlag, 16) If Not FileExists($sDestination) Then $iRet = FileMove($sSource, $sDestination, $iFlag) Return SetError(@error, @extended, $iRet) EndIf Local $aParts = StringRegExp($sDestination, "^(.+?)(\.?\w+)\z", 3) Local $sFile, $iCC = 1 Do $sFile = $aParts[0] & "(" & $iCc & ")" & $aParts[1] $iCc += 1 Until Not FileExists($sFile) $iRet = FileMove($sSource, $sFile, $iFlag) Return SetError(@error, @extended, $iRet) EndFunc Edit: Forgot to enum my counter in the loop
    1 point
  12. I'll show you brute force : #include "Eigen4AutoIt.au3" _Eigen_Startup() $rows = 3 $variables = 3 Local $arrayA[$rows][$variables]=[ _ [ 1, 1, 0 ], _ [ 0, 1, 1 ], _ [ 1, 0, 1 ]] $matA=_Eigen_CreateMatrix_FromArray($arrayA) _ArrayDisplay($arrayA,"original data") Local $arrayB[$rows][1]=[[100], [200], [240]] $matB=_Eigen_CreateMatrix_FromArray($arrayB) _ArrayDisplay($arrayB,"sum") $matX=_Eigen_Multiply_AB(_Eigen_Inverse($matA),$matB) _MatrixDisplay($matX,"result") _Eigen_CloseDown() Of course, this works only for exact solutions (otherwise use least-squares normal equations, for example, see my E4A tutorial Regression), and if you have more than 4 rows of data you'd better us a stable matrix decomposition to obtain the matrix inverse (e.g., householderQR with pivoting, or JacobiSVD if you really want to go to town). Oh, and you do need my Eigen4AutoIt computing environment (see signature).
    1 point
  13. Tekk

    mysterious $i & $h

    See here.
    1 point
  14. You are having troubles with symbols, i could give you some good points. If you declare Vars for paths and so, to make the code more readable, use it from the beginning and dont wait to work with static strings and later must test again, when you change them. Never use " (double-quotes) inside your code with strings, use ' (single-quotes), and double-quotes only inside your strings when needed, by example arguments for a executable, but if you know for sure the filepaths havent spaces you dont need it; it is needed just when the spaces makes imposible to know if is another argument (space-based) or space inside the argument. Allways follow the same rule/pattern you wish and use spaces to do readable, by example: $var &'string'& $var. Use a text editor than helps you, i use Notepad++ with dark background to work and Scite to check and test. The line: Run(' & $AcrobatEx & /A "page=' & $page & '" "C:\Predictions\UTC_80.pdf"') Has string than later you will change by a variable. Do it now, save time. Your vars have strings inside, dont do '$var', since $var='string' , so i could write: Local $pID=RunAs( 'username', 'Logondomain', 'mypass',1, @ScriptDir &'\SelSteamG.exe "arg1 arg2... argn"', @ScriptDir, @SW_HIDE) And your line: Run( $AcrobatExe & ' /A page='& $pagenumber &' '& $PDFDir &'\UTC_'& $pdfnumber &'.pdf' ) I put here some of my code so you can see its important begin right, or could be very confused: If Not StringIsSpace($LHArgs) Then $sEXEParams=(StringInStr($LHArgs,'"',2,2))?($sEXEParams&' '&StringStripWS($LHArgs,3)):($sEXEParams&' "'&StringStripWS($LHArgs,3)&'"') If Not( StringIsSpace($Args) Or StringInStr($Args,'"',2,2) ) Then $Exe=$Exe&' "'&StringStripWS($Args,3)&'"' $Switchs=' -accepteula '& StringStripWS($Switchs,7) Return(Run(@ScriptDir&'\'& $PSexeX & $Switchs &' -w "'& $Dir &'" -u domain -p pass '& $Exe,$Dir,Execute($fShowMode))) By other hand, if you have a long case sentence with same N lines inside every Case, may be you didnt designed well. Consider this comparation: ;------------------------ Select ; Option 1 Case $iMsg = $idM80 $utc = _GetUTC() $page = (($utc + 100) / 100 ) Run('Whatever') ;...N times Case $iMsg = $idM40 $utc = _GetUTC() $page = (($utc + 100) / 100 ) Run('Whatever') EndSelect ;------------------------ Switch $iMsg ; Option 2 Case $idM80 $var='AAA' ;...N times Case $idM40 $var='NNN' Case Else _ReportError('What are you doing?') Exit(-3) EndSwitch $utc = _GetUTC($var) $page= ( $utc+100 ) / 100 Run('Whatever') I hope this could help you a bit, now and future.
    1 point
  15. Welcome to AutoIt and the forum! Can you please tell us which application you try to automate? Pixelsearch isn't always very reliable and there are - depending on the application - better ways to do what you want to do.
    1 point
  16. BrewManNH

    Splash Image Help

    From the help file for SplashImageOn
    1 point
  17. I made a not so simple, but fairly elegant function to enumerate any size array which also write the contents to the console. It is in the spoiler section of this post: It was just a fun exercise. I can't think of any application/purpose where I would need an array with more than 3 dimensions (I find 2-dimensions to be adequate most of the time), but I wanted to make the func dynamic enough to support whatever I threw at it.
    1 point
  18. For the record, here's the thread from yesterday from my cache. EDIT: drego "figured out" that his proxy was broke, and the function by Electon in >this post was the solution. Here it is formatted. Func _SetProxy($proxy, $proxybypass = "") Local $INTERNET_OPTION_PROXY = 38 Local $INTERNET_OPEN_TYPE_PROXY = 3 Local $tBuff = DllStructCreate("dword;ptr;ptr") DllStructSetData($tBuff, 1, $INTERNET_OPEN_TYPE_PROXY) Local $pproxy = DllStructCreate("char[" & (StringLen($proxy) + 1) & "]") DllStructSetData($pproxy, 1, $proxy) DllStructSetData($tBuff, 2, DllStructGetPtr($pproxy)) Local $pproxybypass = DllStructCreate("char[" & (StringLen($proxybypass) + 1) & "]") DllStructSetData($pproxybypass, 1, $proxybypass) DllStructSetData($tBuff, 3, DllStructGetPtr($pproxybypass)) $chk_UrlMkSetSessionOption = _ DllCall("urlmon.dll", "long", "UrlMkSetSessionOption", _ "dword", $INTERNET_OPTION_PROXY, _ "ptr", DllStructGetPtr($tBuff), _ "dword", DllStructGetSize($tBuff), _ "dword", 0) EndFunc ;==>_SetProxy Richard Robertson showed drego how to use it.
    1 point
  19. http://autoit-script.ru/index.php/topic,12724.15.html #include <WinAPI.au3> #include <Array.au3> $hGui = GUICreate('Test', 400, 300) $iListView = GUICtrlCreateListView('Line |Data', 2, 2, 394, 268) ; $iListView = GUICtrlCreateListView('Line', 2, 2, 394, 268) $hListView = GUICtrlGetHandle(-1) ; $hListView = $iListView For $i = 1 To 1000 GUICtrlCreateListViewItem('Line ' & $i & '|' & Random(1000, 9999, 1), $iListView) ; GUICtrlCreateListViewItem('Line '&$i, $iListView) Next GUISetState() $hTimer = TimerInit() $aReturn = _GUICtrlListView_GetAllTextToArray($hListView) $extended = @extended If @error < 0 Then Exit MsgBox(0, 'Message', 'List empty') $sTime = Round(TimerDiff($hTimer)) & ' ms' ; MsgBox(262144, 'Information', _ ; "Items: " & _WinAPI_LoWord($extended) & @LF & _ ; "Columns: " & _WinAPI_HiWord($extended)) _ArrayDisplay($aReturn, $sTime) Func _GUICtrlListView_GetAllTextToArray($hListView) If Not IsHWnd($hListView) Then $hListView = GUICtrlGetHandle($hListView) If Not IsHWnd($hListView) Then Return SetError(1, 0, 0) EndIf Local $hWin, $iItems, $iSubitems $hWin = _WinAPI_GetParent($hListView) If Not $hWin Then Return SetError(2, 0, 0) $iItems = ControlListView($hWin, '', $hListView, 'GetItemCount') If Not $iItems Then Return SetError(-1, 0, 0) $iSubitems = ControlListView($hWin, '', $hListView, 'GetSubItemCount') ; If Not $iSubitems Then Return SetError(-2, 0, 0) If Not $iSubitems Then $iSubitems = 1 Local $aReturn[$iItems][$iSubitems] = [[$iItems]] ; For $i = 0 To $iItems - 1 ; For $j = 0 To $iSubitems - 1 ; $aReturn[$i][$j] = ControlListView($hWin, '', $hListView, 'GetText', $i, $j) ; Next ; Next For $j = 0 To $iSubitems - 1 For $i = 0 To $iItems - 1 $aReturn[$i][$j] = ControlListView($hWin, '', $hListView, 'GetText', $i, $j) Next Next Return SetError(0, _WinAPI_MakeLong($iItems, $iSubitems), $aReturn) EndFunc ;==>_GUICtrlListView_GetAllTextToArray
    1 point
×
×
  • Create New...