Jump to content

Lord Vectronx

Members
  • Posts

    5
  • Joined

  • Last visited

About Lord Vectronx

  • Birthday 10/20/1971

Profile Information

  • Location
    FWI
  • Interests
    Make the most optimized progs, short, simple, and useful as possible(whew) ^_^

Lord Vectronx's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Wow, fantastic mister Jd, bravo ... high-level programming! I have not understand everything but I'm working on it because I've never used the function call, and I confess that I am a bit overwhelmed (question time , I work on a lot of things right now). Anyway thank you for everything. If I'm stuck on something I hope not to abuse by asking for help again
  2. Thanks for all your advices, I do not know if I've done well understood, but the goal is not simply to replace the formulas in the given arguments, but to interpret the command (such as a Java runtime). It keeps me from typing too much on the one hand, and to perform dynamic tests at the discretion of future developments (from a response file for example), all in a script as simple as possible @l3ill Make a function that is already my goal, either by #include or by simply copying and pasting in every script where I need it, the final idea for example to read directly coded lines (OWE etc. .. ) via a response file @Water I'm not familiar with editing configuration files supplied with AutoiT/Scite, the last time I crashed and I had to reinstall, but it's an idea, I'll have a look. Your idea seems to me the most accessible .. remains to be seen if I change the right section ... Question: files modified configurations, are they crushed in the next update (of AutoIt or Scite4Autoit) or should I think about save them before? @jdelaney Thank you for your snippet, I'll test it and let you know I've never used this command, but it seems a little difficult for such a trivial code .. I'm a lazy man you remember but I do not begrudge the effort if necessary although I see the result provided by your script, I do not see how that all commands are interpreted at the same time. IF NOT XXX IF XXX and (IF NOT XXX) or (IF XXX) will be interpreted differently, or maybe I'm wrong I tried to use your idea to push further the concept, here is the modified code: Func SWAPIT($txt) $txt = StringReplace($txt, "INWE", "If Not WinExists") $txt = StringReplace($txt, "OWE", " Or WinExists") $txt = StringReplace($txt, "IPE", "If ProcessExists") $txt = StringReplace($txt, "IWE", "If WinExists") $txt = StringReplace($txt, "WE", "WinExists") $txt = StringReplace($txt, "PE", "ProcessExists") $txt = StringReplace($txt, "AN", " And Not ") $txt = StringReplace($txt, " A ", " And ") Return $txt EndFunc ;==>SWAPIT Func ISITALIVE($txt) $b = StringSplit($txt, "!") $d = "" For $c = 1 To $b[0] ConsoleWrite($txt & @CRLF & "NB=" & StringInStr($b[$c], "(") - 1 & @CRLF & $b[$c]) $result = SWAPIT($b[$c]) $a = StringRegExp($result, "(\w+\s)?(\w+\s)?(\w+\s?)\(([^\),]+)?,?([^\),]+)?,?([^\),]+)?,?([^\),]+)?\)", StringInStr($b[$c], "(") - 1) MsgBox(0, "CodedExp=" & $b[$c] & @CRLF & "Result after swap=" & $result) For $i = 0 To UBound($a) - 1 _ArrayDisplay($a[$i]) $d = $d + $a[$i] Next MsgBox(0, "Final Expression is: " & $d) Next EndFunc ;==>ISITALIVE ISITALIVE('INWE("Oracle Universal Installer","test2")ANPE("oui.exe")ANPE("java.exe")OWE("Notepad")') But still not performing to, my problem remains the same: how to run the final expression obtained? Any idea ??
  3. Hello, I'm a lazy boy (it's a shame I know ) and I would like to avoid rewriting an existence test whenever I need it, so I created a configurable module that replaces invented a code for Used by expressions Autoit. Here is the code in question: Func ISITALIVE($txt) $txt = StringReplace($txt, "IN", "If Not ") $txt = StringReplace($txt, "OWE", " Or WinExists") $txt = StringReplace($txt, "IPE", "If ProcessExists") $txt = StringReplace($txt, "IWE", "If WinExists") $txt = StringReplace($txt, "WE", "WinExists") $txt = StringReplace($txt, "PE", "ProcessExists") $txt = StringReplace($txt, "AN", " And Not ") $txt = StringReplace($txt, " A ", " And ") $true = 1 While $true = 1 $result = Execute($txt) If $result = 1 Then $true = 0 EndIf Sleep(180000) WEnd MsgBox(0,"All Processes Ended?","Indeed!") EndFunc ;==>ISITALIVE ISITALIVE('INWE("Oracle Universal Installer")ANPE("oui.exe")ANPE("java.exe")OWE("Notepad")') The goal here: wait until one or more processes end and verify all 180s that is the case, if yes, then continue Problem: The expression gives what is expected, $txt = 'If Not WinExists ("Oracle Universal stallert") And Not ProcessExists ("oui.exe") And Not ProcessExists ("java.exe") Or WinExists ("Notepad")' However, when I run $txt, So Execute($txt) , the variable $result should be 1 or 0, but there is nothing. That does not work either with Eval () Question: How to "run" the contents of a variable containing Autoit controls (or commands)? Thank you in advance for your answers
  4. Hello, I for some time developing with AutoIt and I met a weird problem . I searched the forum , not perhaps enough and have found no satisfactory answer. I try to " check" certain checkboxes in the next window (see capture below), however ALL the boxes are the same INSTANCE and the same CONTROL ID, so I only have the position to manage the problem ,so ControlClick . Here is the relevant snippet : Global $APPDATA = "Installation de ITESOFT FreeMind 1.9.5!Poste de numérisation!Langue de l'assistant d'installation![CLASS:TNewCheckListBox; INSTANCE:1]" $appinstall = StringSplit($APPDATA, "!") ;Liste d'arguments fenêtre et contrôles à utiliser pour les clics WinWaitActive($appinstall[1], $appinstall[2]) ;~ MouseClick("left", 53, 184) ControlClick($appinstall[1], $appinstall[2], "[CLASS:TNewCheckListBox; INSTANCE:1]", "left", 1, 10, 26) ;~ MouseClick("left", 53, 200) ControlClick($appinstall[1], $appinstall[2], "[CLASS:TNewCheckListBox; INSTANCE:1]", "left", 1, 10, 41) ;~ MouseClick("left", 53, 215) ControlClick($appinstall[1], $appinstall[2], "[CLASS:TNewCheckListBox; INSTANCE:1]", "left", 1, 10, 58) ;~ MouseClick("left", 53, 232) ControlClick($appinstall[1], $appinstall[2], "[CLASS:TNewCheckListBox; INSTANCE:1]", "left", 1, 10, 74) ;~ MouseClick("left", 53, 262) ControlClick($appinstall[1], $appinstall[2], "[CLASS:TNewCheckListBox; INSTANCE:1]", "left", 1, 10, 105) ;~ MouseClick("left", 53, 280) ControlClick($appinstall[1], $appinstall[2], "[CLASS:TNewCheckListBox; INSTANCE:1]", "left", 1, 10, 120) Following, data capture of the active window Result: only the first box is checked, if I comment the first ControClick, it is the next to be checked, so it is that the code works ... but individually.. I tried to separate them by a SLEEP (XXXX), same result, only the first uncommented ControlClick works.. Question: how to make them all work or are there a way around the problem ( Mouseclick does not work ) Environment : WIN7 32bit AutoIt v3.3.10.1 2014 Scite 3.3.7.0 Thank you in advance for your advice (PS: excuse my poor english )
×
×
  • Create New...