Jump to content

cookiekiller89

Active Members
  • Posts

    27
  • Joined

  • Last visited

Everything posted by cookiekiller89

  1. When I run GUI the SCITE Icon picture appears in the top left, im wondering if there's a way to remove it and replace it with something else? Will this change when converted to an exe?
  2. yeah, that's what im looking at now, if that fails i'll look into interrupting functions, cheers for your guidance
  3. yep, im looking, what's the ID for the top right X of the GUI tho? i know GUI_event_close is a constant, but is that linked to the X? if i knew what X was i could just add a func to it like any button ill have a play with something i just found. cheers
  4. That seems like quite a workaround, im sure there must be an obvious solution, i hope someone can give some more insight
  5. I see, i just tried what you said and put it above the GUI Code as before it was situated BELOW and it seems to work as expected and as does when no GUI code is present, I wasn't aware the Globals had to be declared before any script I know you have to declare them, but I guess i just got a little confused there. cheers man. I'm also having troubles exiting the script, i want to exit it from the X, this works when the GUI script is there and not running any functions but as soon as i run a function, i can not hit x on the exit button, is there a return func im missing or am i nesting it wrong from what you can see? i changed it to google the link with a while loop, i realise this will create a lot of pages, but if someone could just give it a quick go, maybe im missing something simple again
  6. yeah it works then resumes. as it's a potential business idea i can't reveal too much of the im scripting for in public im using my laptop and have break key on pgup and pause on pagedown... so i dont see how it's a break problem. #include <IE.au3> HotKeySet("{PAUSE}", "TogglePause") #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> Opt("GUIOnEventMode", 1) Global $Form1_1 = GUICreate("WORDSEARCH", 615, 438, 192, 124) Global $Button1 = GUICtrlCreateButton("Start", 224, 160, 129, 25 GUISetState(@SW_SHOW) FUNC _GUIEXIT() Exit EndFunc While 1 Sleep(100) WEnd Global $homepage Func _Startword() While 1 $homepage = _IECreate("http://www.google.com", 1) ; see parameters again for mind refresh if @extended then ToolTip("Finding page", 0, 0, "Word Search", 1) Sleep(3000) ToolTip("") Else ToolTip("Please wait...creating page...verifying...", 0, 0, "Wordsearch", 1) Sleep(3000) ToolTip("") EndIf EndFunc wend #Region Pause Func, will pause when called Func TogglePause() $paused = NOT $paused While $paused sleep(100) ToolTip("Script Paused", 0, 0, "Wordsearch", 1) WEnd ToolTip(""); (An empty string clears a displaying tooltip) EndFunc #EndRegion
  7. perhaps, but the pause key works fine without sny GUI code present
  8. By exiting pause do u mean just pressing the pause function, as i have it linked to hotkey pause and when pressed it exits script. also i do have the exit command as a function, could that be it? because I have linked with GUI EVENT CLOSE in the paremetres im pretty sure... but saying that i also tried removing the exit function and pausing and i dont think it worked...
  9. hi all, I've recently come across a few setbacks in my script while building my GUI, please excuse me if this is in the wrong forum, i think it could be in both, feel free to move well let me get started when I don't have any GUI code in my script begins off of f5, i have func func func they are all _IE funcs at this point _IE create then _IEtagname i then have this at the bottom of my script Func TogglePause() $Paused = Not $Paused While $Paused Sleep(100) ToolTip('Script is "Paused"', 0, 0) WEnd ToolTip("") EndFunc ;==> now this works fine and pauses perfects whenever i want to use it, but my problem is I've recently made sections of my script my own functions so i've assigned these functions to start off buttons on the GUI. So i have _IE create _IEget tag name and all off that which works fine and as my script allows users to navigate through a site it has more then one link. so i've made functions to acquire each link. and then for whatever purpose they want weather they want to search or goto a home page there's a specific function for it, they just choose from GUI "start button"; search "start button"; homepage it's the only way i could think to do it without my script running everything at once as im new to this. sorry i dont have any code to show im on site with work computers. so i have my GUI with the buttons, i click it and script runs reasonably fine, my problem is when i pause the script, it exits the hole thing, it doesn't take it back to the GUI or anything now my only thinking behind this is it has to do with GUI_@show and when paused it's pausing the gui code as well to be shown which inturn just closes everything... now im kind of at a loss as to what to do, im not sure if i can add togglepause func inside my other funcs so when called it just pauses the specific functions it's inside, i would have no idea how to do this... 'cause im also having problems, with GUI event close... I can close my script when script isnt running from GUI selection,but once ive chosen script and its running it wont close by the X button in the top right, and my only logic behind that is that it wont interupt the current function 'cause it's on a loop to repeat certain actions for the user anyway there's a couple of questions, im mainly worried about the pause func if anyone cangive me some insight into a few things like with my functions that'd be great
  10. sorry, im simply wondering when in my above code you have the variable $input followed by $input.className is there any information that better explains when to connect to the variable with the decimal (.) i know i can use $variable.href and className and theres a few in examples with .form, but just wondering what it's actually doing and if there's a list of them somewhere
  11. hi I'm looking for more information on the decimal value? i see this used a lot and it's not really explained anywhere yet it seems kind of important as my code wont run without it... for instance the below example While 1 $meyes = _IETagNameGetCollection($meme, "input") For $input in $meyes if $input.className == "mll user_action yes green_btn_big btn btn-large btn-success greenBtnBig" Then Sleep(300) _IEAction($input, "click") EndIf Next Sleep(300) WEnd $input.classname... now say i was to get the objectbyid would I replace tagname with _IEgetobjbyid... For $whatever in $whatever if $variable.id == or by the link would i put $variable.hrefName or just $variable.href == just wondering because im trying to get a rollover nav bar that doesnt seem to have input so i have to use another method is there any more information on this or can someone explain it to me
  12. Hi again, i have another question regarding EXAMPLE 2 of _IECreate ; ******************************************************* ; Example 2 - Create new browser windows pointing to each of 3 different URLs ; if one does not already exist ($f_tryAttach = 1) ; do not wait for the page loads to complete ($f_wait = 0) ; ******************************************************* #include <IE.au3> _IECreate("www.autoitscript.com", 1, 1, 0) _IECreate("my.yahoo.com", 1, 1, 0) _IECreate("www.google.com", 1, 1, 0) As it explained above with my script there is no auto log in, so the user will start by logging in, then their homepage will appear where they will start the script. when i goto the site myself and i log in, sometimes i get 2 different addresses not that different but noticeable on the homepage... one ends in /home.html?jli=1 and the other just in /home.html, i can change the number at the end to = 2 = 3 and it will still load. im just wondering if this will still register... as in say i use the /home.html with example 3 and try to attach to that window if it's not already created, will that link register if it's ended with home.html?jli=1, i mean technically it's still the same page and everything is displayed the same... now in example 2 where you give it 3 different URL's do I declare all the URL's in the same variable? say i have URL 1 already loaded up which is the autoitscript in the example so it attaches to that. now i dont have yahoo and google up at all so does the script load those 2 pages even if it finds the autoit, is the goal to load 3 pages or search for ONE of those pages ? as like a loop and if so do i declare it in a variable as i would like to have it search for home.html?jli=1 and just the normal 1 and if it finds one then just not load the other
  13. thanks guys, i overlooked that, I'll have a play and get back to yous update: worked swell. thanku
  14. $oIE = _IECreate("<a href='http://www.autoitscript.com/wiki/Main_Page' class='bbc_url' title=''>http://www.autoitscript.com/wiki/Main_Page"</a>) Sleep(1000) Local $oInputs = _IETagNameGetCollection($oIE, "input") For $oInput In $oInputs If $oInput.value == "Go" Then _IEAction($oInput, "click") Exitloop EndIf Next In the above example is it possible to attain the input without $oIE, so without _IECreate? can the object variable be empty as long as the page exists will it still attain that information then continue with the next actions? IF the user already has the page open, i dont want another page created to get the input, so is there another _IE func or way where _IETagNameGetCollection just recognizes if the page is open and retrieves the input and goes on as normal ?
  15. I found this example which seems to work with the classname, i first tested it with my links and div class and got msgbox then i found in ur suggestion mike we had $oinput for "input" so i guess the o was stopping it? should we have had just $input? would the variable automatically take on that value? or maybe just the value; yes? im not sure, as im still learning i wasn't quite aware of these little things yet so i changed that then tryed with what u said trying the value, but recieved no messagebox... i also tryed .valueNAME"yes" wether or not that is a legit thing i dont know but worth a try. anyway it couldnt read that either so then i tryed the $input.classname and managed to get that. i guess now ill replace msgbox with a click and see if it works apologies to everyone, i dont know much yet, but i learned a bit today, sorry for poor coding #include $oIE = _IECreate("") ; place ie link within. sleep (14000) $divs = _IETagNameGetCollection($oIE, "div") For $div In $divs If $div.className == "id-container-buttons" Then MsgBox(0, "suceed", $div.innerText); should be input box not msgbox, msgbox can't input value? EndIf Next _IEQuit($oIE)
  16. all code is executing without error, but still no result in mouseclick should i try @error before mouseclick to see if it is actually achieving gathering the input, would that work? my script works on the basis that they are already on the page they're about to start the script on, incase window is minimized there is a winactivation func in place so is that achieving the same as _IEcreate in a sense that the page is already there. I tryed with the window existing then activating. so with ie create it creates another window with enough time to load and still no result without winactivate
  17. what's the significance of $oIE? and do i need to declare the page/form or just have the window activated? and if so how do i declare the wanted page?
  18. Hi everyone, I'm having trouble getting reference to a button, im not sure which part of <input class="change-confirm-button id-button-yes green_btn_big" type="button"value="yes" ></input> I'm meant to include and which parametre to include it in am I using the correct IE fuct? I want my script to run then click _IEaction perhaps focus and then click this button so i want any propertie of the button that can be recognizes then have those commands sent to it there is also <input class="change-confirm-button id-button-no grey_btn_big" type="button"value="no" ></input> but if i reference to the button i only want it to click the "yes" button can i get the input class and then reference it to just the yes ? and if so how do i make it recognize the yes? contained in <div class="id-container-buttons" I tryed playing around with _IEgetobjbyname and such, but im not sure there's even a name present
  19. thanks waters, i've had a look at helpfile but i just dont get how things correspond work with each other sometimes, i will try look harder and start a new thread in future. thanks
  20. hi, is there anyway you could explain the use and purpose of the array is it? $counter... i executed this bit of code and paused my script and i recieve the 0 from $counter, im just wondering what is this for, is it just an example for what could be a timer ? also i highlighted some code above and don't understand the operater NOT, which is notEqual ? im just wondering the process 'cause i dont understand u start by calling the function toggle then it says $paused not equal to $ paused i just don't get it 'cause there's nothing in that variable either? so how is the script taking action and know what it has to do? sorry for all my questions, i've tryed looking at the operator and looking at other examples but i just dont understand how all the things work together... I hope to get better with each thing and start to understand the processes a little better. does the variable automatically take on any result i shud say if inside the function/anyfunction 'cause global?? ahh i really dont understand thanks everyone if u can help
  21. thanks yogi, i will look into that
  22. thanks careca, I'll try as you suggest, I have also found a temp fix from another thread which does indeed do what I have requested, ill also had those coords u stated the values there because was location of the button please see change below... While 1 $pixel = PixelSearch (0,0,@DesktopWidth,@DesktopHeight,0x00c02F) if IsArray ($pixel) = True Then Sleep (750) MouseMove($pixel [0], $pixel [1], 1) MouseClick ( "left" ) Sleep (250) EndIf $pixel = PixelSearch (0,0,@DesktopWidth,@DesktopHeight,0x00c02F) if IsArray ($pixel) = True Then Sleep (750) MouseMove($pixel [0], $pixel [1], 1) MouseClick ( "left" ) Sleep (1000) EndIf WEnd added with the @desk seems to search for any colour on the entire screen, I don't understand the mechanics behind itor how stable it is for my script, but it's a step in the right direction, i will continue to use helpfile and cross analyze with thread examples i will also try @error which i thought i had in there before if anyone has a better way or can offer any type of advice i will listen on any points i stated thx again
  23. Hi everyone, First off I apologize for any unclarity in my posts or anything out of the norm as I have only just signed up and this is my first scripting language... I'm aiming to achieve a macro that can push buttons of specific colour in an internet browser I first tryed configuring and playing around with Imagesearch, but came to a bit of a holt due to my limited knowledge in areas. I can achieve what i want with this, (see code below) as my idea here was when 1 button dissapears another one shows up to the side at different coordinates... confirming that this is what I want. I recieved mouse Coords from windows spy, but couldn't get controlid or any text in IE or Firefox i know this has been covered and there are other ways. but my problem is when i eventually make my script available to other users, the resolution settings/toolbars and other factors will alter the coordinates and if no colour is found at such coordinates then mouse will not click. I've tryed looking at the help file and i just can't fathom my problem. Is there anyway to search the entire screen for such pixels as that colour id is only available on these buttons and if found return coords to array then move mouse that way? do i require multiple arrays working at once?like a massive script with every cooridnate in it?im not to good at maths but do enjoy this type of thing. Or if you could provide how to gather elements from buttons and a few functions needed or any helpfiles ill be happy to look and research where u tell me. i just feel lost not knowing if what im doing is even correct. I'm sorry to be spoonfed and i hope i dont waste anyones time thanks While 1 $pixel = PixelSearch (465,391,578,391,0x00c02F) if IsArray ($pixel) = True Then Sleep (750) MouseMove($pixel [0], $pixel [1], 1) MouseClick ( "left" ) Sleep (250) EndIf $pixel = PixelSearch (487,487,582,486,0x00c02F) if IsArray ($pixel) = True Then Sleep (750) MouseMove($pixel [0], $pixel [1], 1) MouseClick ( "left" ) Sleep (1000) EndIf WEnd
  24. Thanks brew, it's my first day with autoit, i was getting confused 'cause the folders name was 'include' and wasn't accessible through startmenu> all programs , but found it attempting to do something that wouldn't have helped me. cheers!
×
×
  • Create New...