Jump to content

Search the Community

Showing results for tags 'problem'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office


  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Member Title




Found 18 results

  1. Hello. I prepared a script to work on my computer every night and i tried to run it with scheduled task in windows Vista. It runs and scheduled task manager gives me positive feedback. But script doesn't work. It runs every msgbox but doesn't want to open file. If i run it myself it works, but if scheduled task runs it doesn't open file. MsgBox(0, "", "Pred odpiranjem filetka") $log = FileOpen("C:\log.txt", 10) MsgBox(0, "", "Za odpiranjem pred pisanjem") FileWriteLine ($log, "****************************"&@YEAR&"-"&@MON&"-"&@MDAY&" ob "&@HOUR&":"&@MIN&":"&@SEC&"******************************************") MsgBox(0, "", "Po pisanju") Filewriteline ($log, "") MsgBox(0, "", "Pred pisanjem") FileClose($log) MsgBox(0, "", "Za zapiranjem") Any help? Any ideas? Thanks in advanced. Dumbledor
  2. Hello forum, I have the problem that I can not use Firefox in combination with WebDriver when using AutoIt on some websites. Of course it does not work with the very website I need it to work with. As soon as I want to open the desired website, I get the little robot icon which tells me that the "browser is under remote control" and the website stays blank. I CAN open the website (www.ebay-kleinanzeigen.de) but I get blocked when I want to go to my account, to be precise. I am using AutoIt I have checked my FireFox version. It is up to date. Also the special browser drivers like gecko etrc. are up to date too and everything works fine with the WebDriver demo. It seems that another user also had the same problem, but the thread has already been closed and the users solution (setting security lower did not work for me). I mean I can only choose between "standard", "strict" and "customized". On "customized I unchecked everything but it still would not change anything. I also have checked Google Chrome and MS Edge. Same result. I tried swiching profiles (only with FireFox). Same result. I tried to acess a previously opened FireFox session where I manually logged in by using this code snippet: _WD_Option('Driver', 'C:\Path\to\the\executable\geckodriver.exe') _WD_Option('DriverParams', '--log trace --connect-existing  --marionette-port 2828') _WD_Option('Port', 4444) Obviously I adjusted the path of the geckodriver.exe but it did not work at all on my computer. So far my code is really basically nothing but I can not even start to code. I myself am not a real coder and I know only the very basics like loops, conditions and variables. ---------------------------------------- ; Script Start #include <Array.au3> #include <AutoItConstants.au3> #include <ButtonConstants.au3> #include <EditConstants.au3> #include <File.au3> #include <GuiComboBoxEx.au3> #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> #include <StringConstants.au3> #include <StaticConstants.au3> #include "wd_core.au3" #include "wd_helper.au3" #include <WindowsConstants.au3> Local $sDesiredCapabilities, $sSession, $sElement SetupGecko() $_WD_DEBUG = $_WD_DEBUG_None _WD_Startup() $sSession = _WD_CreateSession($sDesiredCapabilities) _WD_Navigate($sSession, "https://www.ebay-kleinanzeigen.de/m-meine-anzeigen.html?sort=CREATION_DATE_ASC&keyword=winter") Exit Func SetupGecko() _WD_Option('Driver', 'geckodriver.exe') _WD_Option('DriverParams', '--log trace --marionette-port 2828') _WD_Option('Port', 4444) $sDesiredCapabilities = '{"capabilities":{"alwaysMatch": {"moz:firefoxOptions": {"args": ["-profile", "' & "C:/Users/myaccount/AppData/Roaming/Mozilla/Firefox/Profiles/0123456.default-release" & '"],"log": {"level": "trace"}}}}}' EndFunc ;==>SetupGecko Func SetupChrome() _WD_Option('Driver', 'chromedriver.exe') _WD_Option('Port', 9515) _WD_Option('DriverParams', '--verbose --log-path="' & @ScriptDir & '\chrome.log"') $sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"goog:chromeOptions": {"w3c": true, "excludeSwitches": [ "enable-automation"]}}}}' EndFunc ;==>SetupChrome Func SetupEdge() _WD_Option('Driver', 'msedgedriver.exe') _WD_Option('Port', 9515) _WD_Option('DriverParams', '--verbose --log-path="' & @ScriptDir & '\msedge.log"') $sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"ms:edgeOptions": {"binary": "' & StringReplace(@ProgramFilesDir, "\", "/") & '/Microsoft/Edge/Application/msedge.exe", "excludeSwitches": [ "enable-automation"], "useAutomationExtension": false}}}}' EndFunc ;==>SetupEdge -------------------------------------- I left the three setup functions in, because I do not care what browser I use as long as I can start coding. Also, please understand that I am not trying to be lazy here. I do not want someone to code for me. Maybe the problem is very basic, but I just do not know how to eliminate that restriction. Is it something I need to uncheck in the browser settings or is it more complicated? If you need more information, I will be happy to provide those. If somebody has an idea or a solution, I would very much appreciate it. Edit: I am not bothered by the robot icon itself. I do not care about it. If I try to acess my regular ebay account: "https://mesg.ebay.de/mesgweb/ViewMessages/0" it works like a charm despite the notification that the browser is remotely controlled. My problem is, that the first website does not load for some reason ONLY when the browser is remote controlled.
  3. Hello, global $y, $x #RequireAdmin Global $Paused HotKeySet("{NUMPAD2}", "Pause") HotKeySet("{NUMPAD8}", "End") Opt("MouseClickDownDelay", 30) #include <ImageSearch2015.au3> #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> #include <StaticConstants.au3> #include <WinAPI.au3> #include <WindowsConstants.au3> #include <UpDownConstants.au3> #include <Misc.au3> Sleep(6000) Sleep(3000) $search1 = _WaitForImageSearch("goo.bmp", 30, 1, $x, $y, 10) If $search1 = 1 Then MouseMove(1500, 1500, 10) Sleep(100) MouseClick("right") Sleep(300) EndIf I've this script. The problem is that it work the way it is supposed to but doesnt work on a friends pc, even tho we have the same image search in C/programms(x86)/autoit3/include and the same dll in system 32. When he starts the script on the desktop without having the "goo.bmp" file on his pc, the script finds it and right clicks the given location, while for me it doesnt and i have to open the folder with the "goo.bmp" picture in it. Im out of ideas on what could cause the problem. Any help? Thank you in advance
  4. Hi all. Because of me wondering if I could access the key/value pair arrays with the numbers as indexes, I have found out that the zeroth element for some reason doesn't return anything. Here's the example: local $r[2] $r["test1"]="hello" $r["test2"]="how are you" msgbox(64, $r[0], $r[1]) ; prints the ["test2"] but not ["test1"]. Is this even supposed to be a thing? BTW, I haven't seen Autoit get updated since 2015; is it abandened or something? Any help/clarification appreciated.
  5. Hey there, Probably you know about the many questions on this forum, how to disable Ctrl-Alt-Del. I searched the whole forum bot there was not only one answer that worked. But now i found a way on my own hot to prevent that. And btw I have to say that this if f*cking easy, so shame on you You can try it, it works sure on windows 7 and vista. I also included a hotkey function to exit, but it takes up to 10 seconds until you can access the ctrl alt del screen again. Please tell me if you found out a better way and tell me what is your meaning about my script. Thank you -snip- Edit: This is the hard way, and i just wanted to show how it could be done. I am confused, no one before me mentioned this script
  6. Dear all, I'm creating this program where the goal is to automate some mouse -click and dragging on an external application. Now the problem is, this external application is blocking every automate mouse moves, clicks or anything related to using the mouse. So I figured autoit uses postmessage and user32.dll to move the mouse and that this application blocks these attempts. Now I'm wondering if there's a different way to move the mouse so it'll go undetected by this external app. Any other suggestions are welcome to. Thnx in advance
  7. I've noticed a strange phenomenon, namely the script loops indefinitely when I use "Array" word in the string. Try this: #include <Array.au3> Global $aStrings = StringSplit("Apple,Orange,Array,Milk", ",") _ArrayDisplay($aStrings) For $array = 1 To $aStrings[0] MsgBox(32, "", $aStrings[$array]) Assign($aStrings[$array], $aStrings[$array], 2) Next It never ends, right? Now try another one. Just change "Array" to "Cola" for example. It should works fine. I'm not sure, is it a bug?
  8. I recently managed to make a ListView sort correctly by clicking on it's columns, it does sort items very well but there's a very annoying thing >_< : every time after the items are sorted out, an item gets focused ! After I click a column, one item gets blue'd, like when its selected, even if its not ! Note that this happens only becuase of this function : _GUICtrlListView_SimpleSort Instead, the _GUICtrlListView_SortItems function is not doing this , but because of my luck,I must use _GUICtrlListView_SimpleSort ( but it is faster ) Here's my script to test to see what I mean: #include <GUIConstantsEx.au3> #include <ListViewConstants.au3> #include <WindowsConstants.au3> #include <GUIListView.au3> $Form1 = GUICreate("Form1", 383, 307, 192, 124) $ListView1 = GUICtrlCreateListView("C1|C2|C3", 56, 16, 257, 241) GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 50) GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 1, 50) GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 2, 50) $ListView1_0 = GUICtrlCreateListViewItem("1|5|6", $ListView1) $ListView1_1 = GUICtrlCreateListViewItem("2|7|8", $ListView1) $ListView1_2 = GUICtrlCreateListViewItem("3|9|10", $ListView1) $ListView1_3 = GUICtrlCreateListViewItem("4|11|12", $ListView1) GUISetState(@SW_SHOW) Global $toggle = 1 While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $ListView1 _GUICtrlListView_SimpleSort($ListView1, $toggle, GUICtrlGetState($ListView1)) EndSwitch WEnd How could I get rid of this item focus ?
  9. Im relative new to this awesome script language and every day Im mindblowed but what things I discover and didn't know about the au3 syntax but I have some questions : #1. What is ByRef and what it does/why to use it/where to use it #2. Is this really really true that the first character after the $ sign in the variable name means the type of the variable ??? :shocked: ( Like $iVar = int and $sVar = char types from C ? ) What about if I declare $Random instead ? If the above is true, then why all my created programs are working with random names without the correct specific type declared ? Like $pink = 5 + 5 does works despite the 'p' representing the pointer type ! #3. Why I need to unregister things or close any handles like DllClose after a DllOpen OR _GDIPlus_Shutdown() after my script exists ? #4. And last but not the least why this : #include <Misc.au3> ;Global declarations ;... Func () Func() ; the code Endfunc and not this instead : #include <Misc.au3> ;Global declarations ;... ; the code Will there be any problems whatsoever if the last variant ?
  10. Okay so basically I have another problem with my script again, Not exactly the script it's self but more finding how to add a certain pixel color into it. I've made a few attempts and got it close but not close enough. I'm trying to make the mouse hover over the Pause Button on my Media Player. I'll add the Pixel color into the attachments. If someone could show me how to find the Pixel color in the form of the line "PixelSearch( 0, 0, $i, 768, 0xFF0000, 10 )" then I'd be the most greatful noobie that ever existed misc4.au3
  11. I've been trying to add a hotkey to a script but I only started out earlier today and I am already struggling with the basics (not a big surprise for starting new) anyway I was hoping someone could give me an example on how to make a simple On/Off Hotkey #include <Misc.au3> Global $Paused HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{ESC}", "Terminate") HotKeySet("+!d", "ShowMessage") ;Shift-Alt-d $dll = DllOpen("user32.dll") Dim $coord[3] Func TogglePause() $Paused = Not $Paused While $Paused Sleep(100) ToolTip('Script is "Paused"', 0, 0) WEnd ToolTip("") EndFunc ;==>TogglePause While 1 If _IsPressed("1[", $dll) Then ExitLoop For $i = 0 To 1024 Step 1 $coord = PixelSearch( 0, 0, $i, 768, 0xFF0000, 10 ) If Not @error Then MouseMove($coord[0],$coord[1]) EndIf If _IsPressed("1[", $dll) Then ExitLoop Next WEnd
  12. Hi guys A little but very annoying problem with the new version (2.28) of SciTE editor included in last AutoIT installation... I have a problem with syntax language check and view in the editor. See the attch pic... No blue-bolded text for some autoit words and no _* functions in the help context menu. I have win xp sp3. What's wrong?? THX
  13. For the past days i've been working on a program to make bingo cards, but now i've have a problem. The problem is that i only want 5 numbers on each row and they sould be spred randomly. To see the final result just open up Index.html after you've run the code. Look at the comments in the code for more info. Global $DBFile = @ScriptDir&"\Cards.txt" Global $NumToGenerate = 250 Global $Rnd[3] Global $NumPrVRow = "" Global $FillSpace[27] Global $Row[3] Global $Output Global $Mats[$NumToGenerate] Global $NumbersOnRow[3] ;Create Database File With Mats For $i = 1 To $NumToGenerate ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $i = ' & $i & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console $a = "" For $i2 = 0 To 26 $FillSpace[$i2] = 0 Next $i2 = "" $i3 = "" $i4 = "" $NumPrVRow = "" For $i2 = 0 To 2 While 1 $Rnd[$i2] = Random(1,9,1) $Continue = True For $i3 = 0 To $i2 If ($Rnd[$i2] = $Rnd[$i3]) And ($i2 <> $i3) Then $Continue = False Next If $Continue = True Then ExitLoop WEnd Next For $i2=1 To 9 $a = 2 For $i3 = 0 To 2 If $Rnd[$i3] = $i2 Then $a = 1 Next $NumPrVRow &= $a Next For $i2 = 0 To 2 $NumbersOnRow[$i2] = 0 Next For $i2 = 1 To 9 $OldRnd2 = "" For $i3 = 1 To StringMid($NumPrVRow, $i2,1) While 1 $Rnd2 = Random(1,3,1) ;I tryed to add this line. $NumbersOnRow[$Rnd2-1] += 1 $Continue = True For $i4 = 0 To $i2 ;And change This ;If $Rnd2 = $OldRnd2 Then $Continue = False ;To If ($Rnd2 = $OldRnd2) Or ($NumbersOnRow[$Rnd2-1] > 5) Then $Continue = False Next $OldRnd2 = $Rnd2 If $Continue = True Then ExitLoop ;And Then Also Add This Line: $NumbersOnRow[$Rnd2-1] -= 1 ;But i still could'nt get it to work. WEnd $FillSpace[$Rnd2*9-9+$i2-1] = 1 Next Next $Full = "" For $i2 = 0 To 2 $Row[$i2] = "" For $i3 = 1 To 9 If $FillSpace[($i2+1)*9-9+$i3-1] = 1 Then If $i3 = 1 Then $Row[$i2] &= Random(1,9,1)&";" Else $Rnd3 = Random($i3&0,$i3&9,1) $Row[$i2] &= $Rnd3-10&";" EndIf Else $Row[$i2] &= ";" EndIf Next IniWrite($DBFile, $i, $i2+1, StringTrimRight($Row[$i2],1)) $Full &= $Row[$i2] Next IniWrite($DBFile, $i, "f", $Full) Next $Start = '<html>'&@CRLF&'<head>'&@CRLF&'<style type=text/css>'&@CRLF&' body { font-family: Verdana, Arial, Helvetica;}'&@CRLF&' tr { text-align: center; }'&@CRLF&' .c { padding-top: 35px; padding-bottom: 5px;'&@CRLF&' border-bottom: 2px dashed black; }'&@CRLF&' .s { padding-top: 5px; padding-bottom: 35px; }'&@CRLF&' .c, .s { font-size: 8px;}'&@CRLF&' .pb { page-break-before: always; }'&@CRLF&' .rn { font-family: Verdana, Arial, Helvetica; font-size: 13px; border: 2px solid black;}'&@CRLF&' .pn { font-family: Verdana, Arial, Helvetica; font-size: 18px; text-align: center;}'&@CRLF&'</style>'&@CRLF&'</head>'&@CRLF&'<body onLoad="print();">'&@CRLF&@CRLF&@CRLF $End = @CRLF&'</body></html>'&@CRLF $PageBreak = 1 For $i = 0 To $NumToGenerate-1 ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $i = ' & $i & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console $Mats[$i] = '<div class=pn>Pladenummer: '&$i+1&'F</div>'&@CRLF&'<table width=90% border=1 cols=10 align=center cellspacing=0'&@CRLF&'style="border-collapse: collapse" cellpadding=10> <tr>' For $i2 = 1 To 3 ;Change To ABC $Mats[$i] &= '<tr>'&@CRLF $Split = StringSplit(IniRead($DBFile, $i+1, $i2, ""),";") For $i3 = 1 To 9 $Mats[$i] &= '<td>'&$Split[$i3]&'</td>'&@CRLF Next $Mats[$i] &= '<td class=rn>'&ConvertToABCAndAddDots($i+1&$i2)&'</td>'&@CRLF $Mats[$i] &= '</tr>'&@CRLF Next $Mats[$i] &= '</table><div class=c>Made using The Bingo Program by Jacob Bom Andersen</div></br>'&@CRLF If $PageBreak = 4 Then $Mats[$i] &= '<div class=pb></div>' $PageBreak += 1 Next $Output = $Start For $i = 0 To $NumToGenerate-1 $Output &= $Mats[$i] Next $Output &= $End FileDelete("Index.html") FileWrite("Index.html", $Output) Func ConvertToABCAndAddDots($ToConvert) $Split2 = StringSplit($ToConvert, "") $Out = "" For $b = 1 To $Split2[0] If $b = $Split2[0] Then $Out &= Chr($Split2[$b]+64) Else $Out &= $Split2[$b]&Chr(183) EndIf Next Return $Out EndFunc Ps. The Database File that it is also makeing is for an other program that i've made to play bingo, witch is then also able to check is someone has bingo. Sorry for my bad english.
  14. Hi guys, Been a while since I was last using AutoIt properly and it's showing! I am creating a simple game launcher - before you all pounce, this is not a hack. I will use it to pass command line parameters to a game. Not to hack it. Anyway, I have loaded the background image and have a button displayed - however the text on both the checkbox and group will not change? Looking through the help file, I noted: That sort of contradicts itself? My brother tried to show me optional 'workarounds' however neither of them suited what I want to do. So here is the program. Works the same without the background image. #include <GDIPlus.au3> #include <WinAPI.au3> Global $hGUI, $hImage, $hGraphic, $hLabel Global $hRunGroup, $hRun, $hRunTesting ; Create GUI $hGUI = GuiCreate("Assaultcube Launcher", 400, 400) ;~ GUICtrlSetDefColor(0xFFFFFF, $hGUI) GUISetBkColor(0x000000, $hGUI) GUISetState() ; Create background image _GDIPlus_Startup() $hImage = _GDIPlus_ImageLoadFromFile("C:\Program Files\AssaultCube_v1.1.0.4\packages\misc\startscreen.png") $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGUI) _GDIPlus_GraphicsDrawImageRect($hGraphic, $hImage, 10, -20, 380, 380) ; Hide Loading... text GUICtrlCreateLabel("", 130, 180, 120, 30) GUICtrlSetBkColor(-1, 0x000000) ; Create controls $hRunGroup = GUICtrlCreateGroup("Run Assaultcube", 10, 250, 380, 50) $hRun = GUICtrlCreateButton("Run Assaultcube", 40, 300) $hRunTesting = GUICtrlCreateCheckbox("Testing", 100, 100) ; Set appropriate colours GUICtrlSetColor($hRunGroup, 0xFFFFFF) GUICtrlSetColor($hRun, 0x000000 ) GUICtrlSetColor($hRunTesting, 0xFFFFFF) While 1 switch GUIGetMsg() case -3 _Exit() EndSwitch WEnd Func _Exit() _GDIPlus_GraphicsDispose($hGraphic) _GDIPlus_ImageDispose($hImage) _GDIPlus_ShutDown() Exit EndFunc Can anyone help me to set the group and checkbox text colours please? Please note the background colours must stay the same.
  15. While i am waiting for Better Solutions for Finding Multiple @error Cases and React according to them, i am hoping that some1 could explain me what my problem in this (time consuming) function is.. The Idea is that i check for @Errors from the 3 PixelSearch i am doing, and give Message according to it. I am changing Colors In Paint for Every Loop To Test If the Color Searches Are Correct. All Cases are Working Fine, and the Right MsgBoxes are Triggered, Except the Case where all 3 Colors are Missing: HotKeySet("{ESC}", "End") Global $pixelSearchError1 = @error Global $pixelSearchError2 = @error Global $pixelSearchError3 = @error While 1 Sleep(10) $pixelsearch1 = PixelSearch(100,300,200,512,0x0000ff,10) ;Blue $pixelSearchError1 = @error $pixelsearch2 = PixelSearch(250,310,400,512,0xfa0000,10) ;Red $pixelSearchError2 = @error $pixelsearch3 = PixelSearch(500,300,600,512,0x00ff00,10) ;Green $pixelSearchError3 = @error Call("_errorcheck") WEnd Func _errorcheck() Sleep(100) Select ;Check for Blue Color, Then Proceed. Case Not $pixelSearchError1 ;Found Blue MsgBox(0,"Message","Blue Pixel Found!") Select ;Blue Found. Now check for Red Case Not $pixelSearchError2 ;Found Blue and Red MsgBox(0,"Message","Blue and Red Pixel Found!") Select ;Blue and Red found. Now check for Green Case Not $pixelSearchError3 ;Found Blue, Red and Green MsgBox(0,"Message","Blue,Red and Green Pixel Found!") Case $pixelSearchError3 ;Blue, Red But not Green MsgBox(0,"Message","Found Blue, Red But Not Green") EndSelect Case $pixelSearchError2 ;Blue Found, But Not Red MsgBox(0,"Message","Blue Found, But Not Red") Select ;Blue and Red found. Now check for Green Case Not $pixelSearchError3 ;Found Blue, Green But not Red MsgBox(0,"Message","Found Blue, Green But Not Red") Case $pixelSearchError3 ;Blue, But not Red or Green MsgBox(0,"Message","Could only Find Blue") EndSelect EndSelect Case $pixelSearchError1 ;Blue Not Found MsgBox(0,"Message","Blue Pixel Not Found") Select ;Blue Not Found. Now check for Red Case Not $pixelSearchError2 ;Found Red, But not Blue MsgBox(0,"Message","Found Red, But not Blue") Select ;Found Red, But not Blue Now check for Green Case Not $pixelSearchError3 ;Red and Green, but not Blue MsgBox(0,"Message","Red,Green But not Blue") Case $pixelSearchError3 ;Red, But not Blue or Green MsgBox(0,"Message","Could only Find Red") EndSelect Case $pixelSearchError2 ;Could not find Blue or Red MsgBox(0,"Message","Could not Find Blue and Red") Select ;Blue and Red Not found. Now check for Green Case Not $pixelsearch3 ;Only found Green MsgBox(0,"Message","Only found Green") Case $pixelSearchError3 ;Did not Find Blue,Red or Green MsgBox(0,"Message","No Color was found") EndSelect EndSelect EndSelect Sleep(10) EndFunc I Made a Picture that should make it far easier to see where one Select Case Starts and Ends Check the Link Below. http://imageshack.us/f/9/selectcasegreenerror.gif/ I can't see why the Last Case is not working.. When Blue,Red AND Green are Missing i still get the "Only found Green" Please Help Also, Building the Cases Like this takes up allot of Time and Space, so if you have a Easier way please Tell Like: If Not @error 1 And @error 2 And @error 3 Then But i don't think that Works. I probably want to run 5 PixelSearches and that would mean 5 Select an 32 Cases !!!1!!11 So it would be Great if there was another way of doing this If not, Please do still tell what the problem of my Function is
  16. I am Pretty Happy for my script so far It works as Intended. HotKeySet("f", "Poof") ;Triggers xxx HotKeySet("d", "Poof2") ;Triggers xxx MsgBox(0, "Running", "Running") ;MessageBox Informing that the Script is Running While 1 Sleep(100) WEnd Func Poof2() ;When User Presses D Do: Send("q") MouseClick("left") Send("{tab}") Sleep(10) EndFunc Func Poof() ;When User Presses F Do: Send("w") MouseClick("left") Send("{tab}") Sleep(10) Send("w") MouseClick("left") Send("{tab}") Sleep(10) Send("w") MouseClick("left") Send("{tab}") Sleep(10) Send("w") MouseClick("left") Send("{tab}") Sleep(10) Send("w") MouseClick("left") Send("{tab}") Sleep(10) Send("1") EndFunc But Not in FullScreen ! It Simply Does Not Work in the Application it is supposed to Run in, when i Run the Application in Fullscreen ! Why? I don't get it at all! Ive Beed Adviced to use ControlSend()So i did ! And.. Nothing! ControlSend("Application", "", "", "{tab}") Works like Send (In Windowed, But not FullScreen) Send("w") MouseClick("left")I Got Mouseclick to work 50% ControlClick("Application", "", "" "right", 1)But To Work 100% The Mouseclick has to Occur at the Current Location of the Arrow, Not in the Center of the window. But It appears that ControlClick only is Capable of "Clicking" in a Set X, Y Position. So that can't be the right Command.. Perhaps Some form of Advanced ControlSend String? BUT AGAIN ! WORKS ONLY IN WINDOWED MODE ! The Last one is Simple.. ControlSend("Application", "", "", "d") "d" Is not the Correct Syntax.. Again.. I Would think this can be done by a Advanced ControlSend string. But Then Again.. Why Is Send AND ControlSend Not Working for me in FullScreen? Bonus Info: I Used AutoIt Window Info While the "Application" was in Windowed Mode, So i am fairly shure that i got the Name Right (It Works in Windowed Mode - Why Should the Name be Diffrent in FullScreen?) OK ! Here Is How i got it to work I Compiled it and !!! Run As Administrator ! Sorry Guys ! Beginner Fail (My Third Day with Programming) It's Somewhat Tagged, So hope this will at least help other Newbies
  17. AutoIT Version: OS: Windows 7 x64 I've written the following script: main() Func main() Local $IPAddress = "" Local $recv = "" ;~ Inicialização TCPStartup() $Socket = TCPConnect($IPAddress, 23) ;~ Usuário AguardaString($Socket, "username:") EnviaComando($Socket, "user") ;~ Senha AguardaString($Socket, "password:") EnviaComando($Socket, "password") ;~ Comando de reinicialização AguardaString($Socket, "TBS>>") EnviaComando($Socket, "reboot") ;~ Finalização TCPCloseSocket($Socket) TCPShutdown() EndFunc ;==>main Func AguardaString(Const $Socket, Const $string) Do $recv = TCPRecv($Socket, 500) Until StringInStr($recv, $string) EndFunc ;==>AguardaString Func EnviaComando(Const $Socket, Const $comando) TCPSend($Socket, $comando & @CR) EndFunc ;==>EnviaComando When I hit F5 in SciTE the program works properly. I tried to compile it to both x86 and x64 version, they do not work. Sometimes the autoit icon appears, but the result does not happen. When I put a MsgBox function right after the reboot command, the .exe works. What's happening?
  18. Hey guys, I have been trying to make a script which requests some information and writes it to a notepad file after the information is entered... The whole script runs smoothly (variables, etc) except for the opening of the file/writing to the file.. I have tried Run and FileWriteLine, both with the same results... Was hoping that you could help me on this one (I need this done soon... its a bit important, thanks) Thanks for any feedback and help I have put the script below ; Project: input hours ;means - notepad tracker? If 2 = MsgBox (1,"TimeTracker","Welcome, would you like to begin?") then Exit ;vars $date = InputBox ("TimeTracker","Input date and day"&@CRLF&"format [DAY] - [DATE]") $phys = InputBox ("TimeTracker","Input hours done of Physics") $chem = InputBox ("TimeTracker","Input hours done of Chemistry") $math = InputBox ("TimeTracker","Input hours done of Math") $file = FileOpen ("G:\StudyHours.txt",1) if $file = 1 Then FileWriteLine ("G:\StudyHours.txt",@CRLF&@CRLF&$date&@CRLF&$phys&@CRLF&$chem&@CRLF&$math) MsgBox (0,"TimeTracker","Done! :D") ElseIf $file = 0 Then MsgBox (0,"TimeTracker","Sorry, file not found @_@") EndIf Exit (The error in this case occurred at the file open, it said that it could not either open the file, or find it...)
  • Create New...