All Activity

This stream auto-updates   

  1. Past hour
  2. @TeraWatt, Welcome to the AutoIt forum. Unfortunately you appear to have missed the Forum rules on your way in. (there is also a link in my signature) Please read them now particularly the bit about not discussing game automation - and then you will understand why you will get no help and this thread will now be locked. See you soon with a legitimate question I hope. Jos
  3. -snip- The purpose of my code is to search for 4 colour pixels. If they all happen to be found on the game screen and, have the same y-value (I.e.: they are in constituent places horizontally), then I want to click the first pixel colour. -snip- Please help me!
  4. Thank you for your help, I ended up using mikells code instead but your code works as well. Thank you mikell, I went with your solution as it was more complete. I ended up tweaking it a little but all in all, very much appreciated. EDIT: Thank you a lot for the tip, I was actually thinking of doing this, I'll have to check that ArraySql out first, I have some reading-up to do
  5. In the mean time, this is a quick throw together that seems to work well. I just re-associated the .isn file to this script, and now I can use ISN Studio with my multiple locations. Thanks again for a great product. #Region #pragma compile(Out, ISNLauncher.exe) #pragma compile(Icon, ISNLauncher.ico) #pragma compile(ExecLevel, asInvoker) #pragma compile(UPX, False) #pragma compile(AutoItExecuteAllowed, false) #pragma compile(Console, false) #pragma compile(Compression, 9) #pragma compile(x64, false) #pragma compile(inputboxres, false) #pragma compile(Comments, 'Authored by willichan') #pragma compile(FileDescription, 'Sets the projects folder in ISN Studio to the parent of the current project, then launches ISN Studio') #pragma compile(FileVersion, #pragma compile(InternalName, 'ISNLauncher') #pragma compile(OriginalFilename, ISNLauncher.exe) #pragma compile(ProductName, ISNLauncher.exe) #pragma compile(ProductVersion, #AutoIt3Wrapper_Res_Fileversion_AutoIncrement=n #AutoIt3Wrapper_Res_Language=1033 #AutoIt3Wrapper_AU3Check_Stop_OnWarning=y #AutoIt3Wrapper_Run_Tidy=y #AutoIt3Wrapper_Run_Au3Stripper=y #Au3Stripper_Parameters=/striponly #EndRegion #cs ---------------------------------------------------------------------------- Project Name: ISN Studio Launcher Description: Sets the projects folder in ISN Studio to the parent of the current project, then launches ISN Studio Creation Date: 9/21/2017 AutoIt Version: v3.3.14.2 Author: willichan #ce ---------------------------------------------------------------------------- Local $newpath, $exepath, $isnpath $exepath = RegRead("HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{7AAAE763-9EE4-448D-994F-94B52EEAA180}_is1", "InstallLocation") If @error Then $exepath = RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{7AAAE763-9EE4-448D-994F-94B52EEAA180}_is1", "InstallLocation") If @error Then MsgBox(0, "ISN Studio Launch Error", "Unable to locate ISN Studio path") Exit EndIf If StringRight($exepath, 1) <> "\" Then $exepath &= "\" $exepath &= "Autoit_Studio.exe" If Not FileExists($exepath) Then MsgBox(0, "ISN Studio Launch Error", "Unable to locate ISN Studio") Exit EndIf If @Compiled Then If $CmdLine[0] < 1 Then MsgBox(0, "ISN Studio Launch Error", "This script should not be launched directly") Exit EndIf $isnpath = $CmdLine[1] Else $isnpath = "C:\LocalProjects\ISNLauncher\ISNLauncher.isn" EndIf $newpath = StringLeft($isnpath, StringInStr($isnpath, "\", 0, -2) - 1) IniWrite(RegRead("HKCU\Software\ISN AutoIt Studio", "Configfile"), "config", "projectfolder", $newpath) Run($exepath & " " & $isnpath)
  6. .... If you like to play with SQL give also a try to the following script ... #include <File.au3> #include 'ArraySql.au3' ; <-- Get this from the following link: ; Local $ar _FileReadToArray("results.txt", $ar, $FRTA_ENTIRESPLIT, ": ") _ArrayToDbTable($ar, "DBarray") ; Transform the array into a Memory SQLite DB called "DBarray" _SQLite_Exec($g__hMemDb, "UPDATE DBarray SET Column1 = replace(Column1, ',', '.' );") ; change "," with "." ; Perform the SQL Query $aResult = _ArrayFromSQL("SELECT column0, AVG(Column1) FROM DBarray GROUP BY Column0 ORDER BY column0;") If Not @error Then _ArrayDisplay($aResult, "result of query") Else MsgBox(0, "error", $g__sSQLiteError) EndIf
  7. BTW, the issue was that the array did not have a second "cell". If Not $PlaylistArr[1] = "" Then PlayMusic() EndIf Replaced it with this and it works: If UBound($PlaylistArr) > 1 Then PlayMusic() EndIf Thanks Jos
  8. ShellExecute("cmd.exe", "", @WorkingDir, "runas") but instead of trying to control the cmd-window with Send() you can do something like this: ShellExecute(@ComSpec, "/c net start ewSystemMonitor & net start Envisionware RFIDLink", @WorkingDir, "runas") Or you give your script and all programs which get run by it admin privileges with #RequireAdmin
  9. That's why I am surprised. Yes running from SciTE with F5, no error. Huh, but I've just seen this: ! Your script requires Admin rights while SciTE is running at normal level! This means no Console output from the script will be displayed and SciTE will show the script as ended right away. TIL when you use #RequireAdmin start SciTE with admin rights as well.
  10. .. and you don't get any error? Are you running from SciTE with f5? if not, what happens when you do? Jos
  11. Why are you using option 2 for the 4th parameter in stead of 0? Jos
  12. Hey, the code worked just fine, made some adjustments and now it only runs once and exits. If I remove all the IF statements and variables I'm left with this which should obviously loop: While 1 Sleep(100) WEnd #include <File.au3> #include <Array.au3> #RequireAdmin HotKeySet("{F8}", "Terminate") Global $VLCExePath = "C:\Program Files\VideoLAN\VLC\VLC.exe" Global $ChatLogLocation = @ScriptDir & "\mumble-chat.txt" Global $PlaylistArr[1] While 1 ;~ WinActivate("Mumble") ;~ WinWaitActive("Mumble") ;~ Send("^a") ;~ SLeep(50) ;~ Send("^c") ;~ SLeep(50) $MumbleChat = ClipGet() ; checkne current Mumble Chat $MumbleChatCharCount = StringLen($MumbleChat) ; spočita chary $ChatLog = FileRead($ChatLogLocation) ; checkne uloženy mumble chat $ChatLogCharCount = StringLen($ChatLog) ; spočita chary If $MumbleChatCharCount > $ChatLogCharCount Then ; pokud je current mumble chat 'delši' splitne jen tu novou část $ChatUpdated = StringRight($MumbleChat, $MumbleChatCharCount - $ChatLogCharCount) ; splitne novou část FileWrite($ChatLogLocation, $ChatUpdated) ; zapíše novou část do chat logu $PlayCommand = StringInStr($ChatUpdated, "!Play") ; checkne jestli je v nové části command a link If $PlayCommand > 0 Then $HowManyLinks = StringReplace($ChatUpdated, "!Play", "!Play") ; checkne kolik linku $HowManyLinksCount = @extended If $HowManyLinksCount = 1 Then ; pokud jen jeden link $LinkRaw = StringInStr($ChatUpdated, "!Play http") $Link = StringMid($ChatUpdated, $LinkRaw + 6, 43) StringReplace($Link, @CRLF, "") StringReplace($Link, @CR, "") StringReplace($Link, @LF, "") _ArrayAdd($PlaylistArr, $Link) If @error Then MsgBox(1, "", "array add failed") EndIf _ArrayDisplay($PlaylistArr) ;MsgBox(1, "", "play music once") Else ; pokud vice linku For $i = 1 to $HowManyLinksCount $LinkRaw = StringInStr($ChatUpdated, "!Play http", 0, $i) $Link = StringMid($ChatUpdated, $LinkRaw + 6, 43) StringReplace($Link, @CRLF, "") StringReplace($Link, @CR, "") StringReplace($Link, @LF, "") _ArrayAdd($PlaylistArr, $Link) Next _ArrayDisplay($PlaylistArr) ;MsgBox(1, "", "play music more times") EndIf EndIf Else MsgBox(1, "", $MumbleChatCharCount & " / " & $ChatLogCharCount) EndIf If Not $PlaylistArr[1] = "" Then PlayMusic() EndIf Sleep(100) _ArrayDisplay($PlaylistArr) WEnd Func PlayMusic() MsgBox(1, "", $PlaylistArr[1]) $LinkToPlay = $PlaylistArr[1] ShellExecuteWait($VLCExePath, "--qt-start-minimized --no-video " & $LinkToPlay & " vlc://quit") _ArrayDelete($PlaylistArr, 1) EndFunc Func Terminate() Exit EndFunc
  13. Today
  14. Thanks I solved it... _FileWriteFromArray ( $sFilePath, $aArray ,1 ,Default ,",") The makes the output file with delimiter as comma and also avoids printing row value and Column value at first list.
  15. Good to hear As i said before, it would be a nice feature for the next update to define multiple project paths.
  16. This script doesn't seem to be doing it: #include <Misc.au3> Local $1 = 0 $1 = MsgBox (4,"Restart Service", "Do you wish to restart the RFID service?") If $1 = 6 Then RunAs ("administrator", @ComputerName, "password", 2, "C:\Windows\system32\cmd.exe", "", @SW_MAXIMIZE) WinWait ("cmd.exe") Send ("net start ewSystemMonitor {ENTER}") Send ("net start Envisionware RFIDLink {ENTER}") Sleep (301) Send ("Exit {ENTER}") Else Exit EndIf The above script apparently runs the command prompt without elevating it. Does anyone have a simple helpful tip for me? Thanks,
  17. DigDeep, Adding the Application2 file as an include places that code in the Parent Application file at the point of the #include line. So all the code in that file is parsed before any of the code in the parent - hence you are calling the GUI2 function in the App2 file to create a button in a non-existent GUI. I have modified the files so that they work as you wish - please read the comments I have added: Parent Application.au3 Application2.au3 Note the requirement to put a placeholder value in the $Button2 variable - if you set it to 0 or leave it undeclared then the Case will file immediately you enter the idle loop as GUIGetMsg returns 0 as the default when no event has occurred. Please ask if you have any further questions. M23
  18. 3rd time is the charm? Think I was just making it too retardedly hard trying to be all mathy about it #include <Array.au3> Local $aArray1[6][3] = [[1, "Dog", "1111"], [2, "Ant", "2222"], [3, "Frog", "3333"], [4, "Duck", "4444"], [5, "E", "5555"], [ 6, "Tree", "6666"]] Local $aArray2[3][2] = [[2, "Ant"], [14, "Duck"],[ 1,"Tree"]] For $i = UBound($aArray1) - 1 To 0 step -1 For $j = UBound($aArray2) - 1 to 0 step - 1 If $aArray1[$i][1] = $aArray2[$j][1] OR $aArray1[$i][1] = "E" Then _ArrayDelete($aArray1 , $i) exitloop EndIf Next Next _ArrayDisplay($aArray1) edit: reduced
  19. azarav, Unfortunately you appear to have missed the Forum rules on your way in. Please read them now - particularly the bit about not discussing game automation - and then you will understand why you will get no help and this thread will now be locked. See you soon with a legitimate question I hope. M23
  20. azarav, Welcome to the AutoIt forums. What app or game are you trying to automate? M23
  21. @iamtheky Thanks again. So should this work for using either Col 0 or Col 1 depending upon what is defined in If $aArray1[$i][0] = $aArray2[$j][0] or If $aArray1[$i][1] = $aArray2[$j][1]?? I thought just changing the If statement to reflect Col choice should work. It seems the counter is influenced by the col choice.
  22. How do i make my bot auto click when green text pop ups I really want to know how, i make my bot auto click when green text pop ups after 30/60 seconds.
  23. Yea right ... "zo helder als modder". Jos
  24. @alminago, Please read the forumrules about sending PM's soliciting for help: EDIT: and while reading also read point 6. carefully as that seem another one that applies to you! Jos
  25. This could be a way to go. Since I have multiple project locations, I would need to change the folder location each time. Where is this path stored? I could re-associate the .isn files to a simple launcher script that would change the main folder to the appropriate path, then launch ISN Studio. ----- Edit ----- I found the config.ini file. I think this might work for me.
  26. The default delimiter is "|" when writing a 2-dimensional array. You have to override the default value. Read the help file for more details.
  1. Load more activity