Jump to content

phinney

Members
  • Posts

    14
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

phinney's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. can anyone help with this?
  2. I've been working on a program that will automatically invite members to a usergroup on a social networking site for public use. The program itself works now im just ironing out the kinks so to speak. Right now the program will open up an invisible IE window, click a link, which will cause the next window to popup(visibly) for about a half a second before it dissapears. This is accomplished by waiting for the page to load enough to have a title, then hiding the window based on that title(see code). I was wondering if it was possible to simply have the new window be opened already invisible? $oIE = _IECreate ("http://search.vampirefreaks.com/search_results.php?pg="&$page&"&sex="&$gender&"&search_city=&search_state=&search_state2=&search_country=&range=10&zipcode=&min_age=&max_age=&sexuality=0&sortby="&$sortby&"&only_pics=1&invite=cult&invite_to=The_Red_Room&invite_system=oldskool",1,0) _IELoadWait ($oIE) $oForm = _IEFormGetCollection ($oIE,1) $oQuery = _IEFormElementGetCollection ($oForm,1) _IEFormSubmit ($oForm) $oInvite = _IEAttach ("http://vampirefreaks.com/group_invite.php","URL") WinWait ("VampireFreaks.com - Group Invites","",60) If WinExists ("VampireFreaks.com - Group Invites") Then _IEAction ($oInvite,"invisible") _IELoadWait ($oInvite) Note: I cannot simply use _IECreate to make the popup window because clicking on the submit button is what makes the usernames of the people you would be inviting appear in the required areas. Basically how that works: Loads up Usersearch page invisibly Clicks "invite" button (All users that were on that usersearch page now appear in a table and are able to be invited) Waits for page to load enough, then hides the new popup clicks button to invite members As i said, if you dont click the "invite" button from the first page, you will not have the usernames on the second page that pops up.
  3. #include <IE.au3> $oIE = _IECreate ("http://www.stickam.com/loginForm.do") _IELOADWAIT ($oIE) $oUsername = _IEFormGetObjByName ($oIE, "j_username") _IEFormElementSetValue ($oUsername, "E-mail Address goes here") $oPassword = _IEFormGetObjByName ($oIE, "j_password") _IEFormElementSetValue ($oPassword, "Password Goes Here") That code there doesnt include the clicking on the login button. because I havent gotten to the point of needing to write it because I cant even get the username/password fields to fill up. When you look at the source of the webpage, there isnt any actual Forms (<form...>) so I dont know if _IEForm commands will even work...
  4. Hey, I was wondering if it was possible to make a script to automatically login to stickam. Basically I want to write a script that when opened will automatically go to this url: http://www.stickam.com/loginForm.do which is simply the login form for stickam, if you login with that form it will take you to your profile page I kind of understand the _IEFORM codes but nothing im trying is working can someone please take a look at that webpage and offer some insight as to what i have to do to get it to select the two textboxes for the username/password then click the Login button?
  5. For the past couple months I've been working on a program for the site Vampirefreaks.com to autmatically invite members to a specific usergroup. I finally got everything working properly when the webmaster changed how the website invites You used to have to click an invite button, then a new window would pop up The program worked that way. Now however, the webmaster made an ajax code to simply embed the page that used to pop up into the first page(look at the pictures) This is the first page that, clicking on the "invite" button used to open up a new window, now it does this: How would I get my program to wait for this ajax control to load up before clicking on the "Submit" button in that window? Thanks for any help you guys can give me
  6. thank you for the fast responce! and that worked out perfectly!! thank you very much!
  7. This is the third Post im making here asking for help(and each time the help I recieved worked and solved the problem, so if anyone who helped me before is reading this, thank you again) The program I'm writting works fine up until the point it asks you which page you want to start on on a usersearch on the site vampirefreaks. the code below is the function im using: Func pagestart() Local $page1, $btn, $msg, $pagestart1 $pagestart1 = GUICreate("Select what page to start on:", 200, 60) $pagestart1 = GUISetStyle($WS_THICKFRAME) $page1 = GUICtrlCreateInput("1", 0, 0, 200, 20) $btn = GUICtrlCreateButton("Ok", 65, 20, 60, 20) GUISetState() $msg = 0 While $msg <> $GUI_EVENT_CLOSE $msg = GUIGetMsg() Select Case $msg = $btn $page = $page1 ExitLoop EndSelect WEnd GUIDelete() EndFunc $oIE = _IECreate ("http://search.vampirefreaks.com/search_results.php?pg="&$page&"&sex="&$gender&"&search_city=&search_state=&search_state2=&search_country=&range=10&zipcode=&min_age=&max_age=&sexuality=0&sortby="&$sortby&"&only_pics=1&invite=cult&invite_to=Vocal_Violence") $page is what needs to be changed to whatever the person inputs into the GUI as you can see $page1 is the variable associated with the input box, and when you click the "ok" button i have $page = $page1 I've written in message boxes to test it by displaying the value of $page. If i chose 8 for example, and pressed "ok" then a message box would pop up and display the number 8, so i know $page gets changed to 8. However, when the webpage opens up it will ALWAYS go to page 3, no matter what number i put into the input field. If i place a message box after it opens up the webpage to view the value of $page it still returns a value of 8. So how would I go about making it so it would go to the page that the user specifies?
  8. Thank you, That is EXACTLY what i needed!
  9. Im currently writting a script to automate clicking different submit buttons on webpages, I have successfully made the script click the first submit button. Clicking on that submit button opens another Internet explorer window which has another submit button I need the script to click on. $oIE = _IECreate ("http://search.vampirefreaks.com/search_results.php?pg="&$page&"&sex="&$gender&"&search_city=&search_state=&search_state2=&search_country=&range=10&zipcode=&min_age=&max_age=&sexuality=0&sortby="&$sortby&"&only_pics=1&invite=cult&invite_to=Vocal_Violence") _IELoadWait ($oIE) $oForm = _IEFormGetCollection ($oIE,1) $oQuery = _IEFormElementGetCollection ($oForm,1) _IEFormSubmit ($oForm) That is the code to click the first submit button, upon clicking it a new window opens up with another submit button on it. The url to the second page that opens is: http://vampirefreaks.com/group_invite.php The question I have is how do i make the second instance of Internet Explorer have a variable like $oIE in the first one and be able to use the _IELoadWait and other commands with that new window? Note: I cant have the script make a new window using _IECreate with the second pages url
  10. one more question regarding this, as I am still having issues, many thanks for helping me thus far. The button i want to click doesnt have a name. <input name='submitExample' type='submit' value='Submit'> That is what i'm talking about, in any example script you use through autoit, whatever you're trying to interact with has a name. The button im trying to press does not have a name, the HTML is simply: <input type='submit' value='invite'> Is there any way I can click that button even though it doesnt have a name? I've been racking my brains for this script, i've litterally spent 2-4 hours a DAY trying to figure this script out and i've been working on this for about a week now
  11. Thank you, ill give the codes a try
  12. Ill just write what i have for my regular script and explain what i want to do (including pictures) The script will automatically invite people to a "cult"(usergroup) on the Site vampirefreaks.com Opt("WinTitleMatchMode", 2) $page=Inputbox ("Chose a page number to start on", "Please select a page number to start on", "","",250,125) $oIE = _IECreate ("http://search.vampirefreaks.com/search_results.php?pg="&$page&"&sex=all&search_city=&search_state=&search_state2=&search_country=&range=10&zipcode=&min_age=&max_age=&sexuality=0&sortby=user_datejoined&only_pics=1&invite=cult&invite_to=OHEMGEE") Sleep(2000) WinActivate ("Advanced Search") WinSetState ("Advanced Search", "", @SW_MAXIMIZE ) This code will automatically open up Internet Explorer to the link in the code (on the page you specify in the inputbox) Website Picture If you look at the picture, I want it to automatically click on the Invite button(boxed in red) but you must scroll down to even see it. When using _IEPropertyget(like in the first post) it could potentially find the button and click on it, but because I have to scroll down to actually see the button the script will just attempt to move the mouse off screen(below the start menu) and just click there instead of scrolling down and then clicking on it. HTML code for the Invite button is: <input type='submit' value='invite'> [font color=red]No "name" attribute So, The basic question is: How would I have the website scroll down, then click on the button instead of just attempting to click a button that is not visible on the screen by trying to send the mouse further down then physically possible to click said button. Example Script(should work for anyone who had Autoit installed, just make a new script with it and run it) #include <IE.au3> $oIE = _IE_Example("form") $oForm = _IEFormGetObjByName($oIE, "ExampleForm") $oTextArea = _IEFormElementGetObjByName($oForm, "submitExample") sleep(5000) $iScreenX = _IEPropertyGet($oTextArea, "screenx") $iScreenY = _IEPropertyGet($oTextArea, "screeny") $iBrowserX = _IEPropertyGet($oTextArea, "browserx") $iBrowserY = _IEPropertyGet($oTextArea, "browserY") $iWidth = _IEPropertyGet($oTextArea, "width") $iHeight = _IEPropertyGet($oTextArea, "height") MouseClick("left",$ibrowserx + $iWidth/2,$ibrowserY + $iHeight/2) Note: This example script will click on the "Aaron" box, I want it to click on the "Submit" button below that
  13. Also, If anyone knows whether or not you can have it search for a button without a "name" Like, the example has you search for the "name" given to the specific thing so in the example Im searching for "submitExample" in the code: <input name='submitExample' type='submit' value='Submit'> for the real program, this is all i have to work with: <input type='submit' value='invite'> but it is the only button on the page and nothing else on the page has "type='submit'" on it. I cant just mouseclick for this because: 1. I plan on releasing this so many people can do it, and with different screen sizes that wouldnt work 2. The button can move slightly depending on how wide something on the page may be...
  14. For the purpose of figuring this out I'm using the help file for this command which i have posted below. I understand what each spot is doing(or have a good enough idea to do what i want it to do in the real program) but the issue lies when you try and click something off screen. For me, I have to scroll down slightly to get to the "Submit/Reset" button on the second page that pops up when running this script. When editing this script to search for the name of that button it will simply move my mouse off screen(down by the start button) #include <IE.au3> $oIE = _IE_Example ("basic") If _IEPropertyGet ($oIE, "addressbar") Then MsgBox(0, "AddressBar Status", "AddressBar Visible, turning it off") _IEPropertySet ($oIE, "addressbar", False) Else MsgBox(0, "AddressBar Status", "AddressBar Invisible, turning it on") _IEPropertySet ($oIE, "addressbar", True) EndIf ; ******************************************************* ; Example 2 - Open a browser with the form example and get a reference to the form ; textarea element. Get the coordinates and dimensions of the text area, ; outline its shape with the mouse and come to rest in the center ; ******************************************************* ; $oIE = _IE_Example("form") $oForm = _IEFormGetObjByName($oIE, "ExampleForm") $oTextArea = _IEFormElementGetObjByName($oForm, "textareaExample") ; Get coordinates and dimensions of the textarea $iScreenX = _IEPropertyGet($oTextArea, "screenx") $iScreenY = _IEPropertyGet($oTextArea, "screeny") $iBrowserX = _IEPropertyGet($oTextArea, "browserx") $iBrowserY = _IEPropertyGet($oTextArea, "browserY") $iWidth = _IEPropertyGet($oTextArea, "width") $iHeight = _IEPropertyGet($oTextArea, "height") ; Outline the textarea with the mouse, come to rest in the center MouseMove($iScreenX, $iScreenY) MouseMove($iScreenX + $iWidth, $iScreenY) MouseMove($iScreenX + $iWidth, $iScreenY + $iHeight) MouseMove($iScreenX, $iScreenY + $iHeight) MouseMove($iScreenX, $iScreenY) MouseMove($iScreenX + $iWidth/2, $iScreenY + $iHeight/2) That is the original code, which will use the mouse to outline one of the textboxes ; ******************************************************* ; Example 1 - Open a browser with the basic example, check to see if the ; addressbar is visible, if it is turn it off, if it is not turn it on ; ******************************************************* ; #include <IE.au3> $oIE = _IE_Example ("basic") If _IEPropertyGet ($oIE, "addressbar") Then MsgBox(0, "AddressBar Status", "AddressBar Visible, turning it off") _IEPropertySet ($oIE, "addressbar", False) Else MsgBox(0, "AddressBar Status", "AddressBar Invisible, turning it on") _IEPropertySet ($oIE, "addressbar", True) EndIf ; ******************************************************* ; Example 2 - Open a browser with the form example and get a reference to the form ; textarea element. Get the coordinates and dimensions of the text area, ; outline its shape with the mouse and come to rest in the center ; ******************************************************* ; $oIE = _IE_Example("form") $oForm = _IEFormGetObjByName($oIE, "ExampleForm") $oTextArea = _IEFormElementGetObjByName($oForm, "submitExample") ; Get coordinates and dimensions of the textarea $iScreenX = _IEPropertyGet($oTextArea, "screenx") $iScreenY = _IEPropertyGet($oTextArea, "screeny") $iBrowserX = _IEPropertyGet($oTextArea, "browserx") $iBrowserY = _IEPropertyGet($oTextArea, "browserY") $iWidth = _IEPropertyGet($oTextArea, "width") $iHeight = _IEPropertyGet($oTextArea, "height") ; Outline the textarea with the mouse, come to rest in the center MouseMove($iScreenX, $iScreenY) MouseMove($iScreenX + $iWidth, $iScreenY) MouseMove($iScreenX + $iWidth, $iScreenY + $iHeight) MouseMove($iScreenX, $iScreenY + $iHeight) MouseMove($iScreenX, $iScreenY) MouseMove($screenx + $iWidth/2, $screeny + $iHeight/2) This script here is slightly edited to find "submitExample" instead of "textareaExample"(so its looking for the submit button at the bottom of the page) Changing the &iScreenX and $iScreenY to $iBrowserX and $iBrowserY in this section of the code: MouseMove($iScreenX, $iScreenY) MouseMove($iScreenX + $iWidth, $iScreenY) MouseMove($iScreenX + $iWidth, $iScreenY + $iHeight) MouseMove($iScreenX, $iScreenY + $iHeight) MouseMove($iScreenX, $iScreenY) MouseMove($screenx + $iWidth/2, $screeny + $iHeight/2) would make sence to me fixing it, but i did that and it didnt work. I've also tried having the script scroll all the way to the bottom of the page before doing anything else, and it still doesnt do it properly Until I can get the script to click the button that initially appears off screen, the real script im writting is stuck
×
×
  • Create New...