psychoblast
Members-
Posts
13 -
Joined
-
Last visited
psychoblast's Achievements
Seeker (1/7)
0
Reputation
-
trying to make an auto login. Help please
psychoblast replied to psychoblast's topic in AutoIt General Help and Support
you guys are lame. -
Hi i am trying ot make a bot that auto logins for this website. So far I am able to create the IE window which is www.growsocials.com However, i cannot seem to find the name of the form because I get IE status no match. I inspect element in google chrome and it says the name of the login forms are email and password. When i use that in my code it does not work. what Am i doing wrong? #include <IE.au3> Local $oIE = _IECreate("http://www.growsocials.com",0,1,1) Sleep (2000) $oFormEmail = _IEFormElementGetObjByName($oIE, "email") Sleep (1000) _IEFormElementSetValue($oFormEmail, "myemail@yahoo.com")
-
How would I go about loading a list of URLS using the IE create or IE navigate functions? I would imagine id have to create an array variable that stores all the info of the websites. in my case it will be separated by a comma. How would i do this? any help is appreciated. Here is what I got so far: Global $iMax=1000 Global $videos[$iMax] = [0] Global $i While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $Button1 $videos = StringSplit($Input1, ",") For $i = 1 to $Input1 If UBound($videos) = $i Then ; Resize the array ReDim $videos[$videos[0] + $iMax] EndIf $videos[$i] = $Input1 & $i ; Remember to update the count or last item $videos[0] = $i Next giving me an error with the array
-
If loop questions (easy)
psychoblast replied to psychoblast's topic in AutoIt General Help and Support
well my bad it might not be easy :/ but the concept is. Here is what i have so far. however it gives me syntax error. $oValue = _IEFormElementGetValue(ByRef $oFormR) If $oValue > 0 Then _Main() Func _Main() Sleep (7000) Local $hBitmap, $hClone, $hImage, $iX, $iY ; Initialize GDI+ library _GDIPlus_Startup() ; Capture 32 bit bitmap $hBitmap = _ScreenCapture_Capture("") $hImage = _GDIPlus_BitmapCreateFromHBITMAP($hBitmap) ; Create 24 bit bitmap clone $iX = 200 $iY = 70 $hClone = _GDIPlus_BitmapCloneArea($hImage, 248, 602, $iX, $iY, $GDIP_PXF24RGB) ; Save bitmap to file _GDIPlus_ImageSaveToFile($hClone, @DesktopDir & "GDIPlus_Image.bmp") ; Clean up resources _GDIPlus_ImageDispose($hClone) _GDIPlus_ImageDispose($hImage) _WinAPI_DeleteObject($hBitmap) ; Shut down GDI+ library _GDIPlus_Shutdown() EndFunc ;==>_Main Sleep (2000) $oFormR=_IEGetObjByName($oIE,"response") _IEAction($oFormR, "focus") _IEFormElementSetValue($oFormR,"Thanks") ElseIf $oValue == 0 Then MsgBox (0,"attention", "no form found") EndIf basically this code does this. if a certain form is found on a page then it does the main function which takes a picture and crops it. However, if IEFormelement returns the value 0 meaning the form was not found i want a message box to appear -
Sorry i am not very familiar with autoit syntax and help files dont help much. What I want to do is have an if loop. If a certain form exists (in IE) then call a certain function or do a certain operation. Is there an IE function to see if a certain form exists? Thanks in advance
-
So i am trying to download a specific image and So far I have the code that tell you how many images are on a website and then displays there src in order in a textbox. However, what if i want to save image number 33 into a txt file or put it into a variable. Ho would i do that? $oImgs = _IEImgGetCollection($oIE) $iNumImg = @extended MsgBox(0, "Img Info", "There are " & $iNumImg & " images on the page") For $oImg In $oImgs MsgBox(0, "Img Info " , "src=" & $oImg.src) InetGet ("$oImg", @DesktopDir) Next
-
Downloading specific image help...
psychoblast replied to psychoblast's topic in AutoIt General Help and Support
Ok im am using a random video on youtube. When you comment too many times you get a captcha image. I am trying to download that. Here is my full code. Not sure if its really legal in this forum that is why I did not include it. #include<IE.au3> ;_IEErrorHandlerRegister() ;_IELoadWaitTimeout(5000) $oIE=_IECreate("http://www.youtube.com/watch?v=JjmeSwPig_8",0,1,1) _IELoadWait($oIE) $oForm=_IEGetObjByName($oIE,"comment") _IEAction($oForm, "focus") ;_IEFormSubmit($oForm) ;$oSubmit=_IEGetObjByName($oIE,"add_comment_button") _IEFormElementSetValue($oForm,"Thanks") $oButtons = _IETagNameGetCollection ($oIE, "button") For $oButton In $oButtons If $oButton.type = "submit" Then _IEAction ($oButton, "click") Next $oImgs = _IEImgGetCollection($oIE) $iNumImg = @extended MsgBox(0, "Img Info", "There are " & $iNumImg & " images on the page") For $oImg In $oImgs MsgBox(0, "Img Info " , "src=" & $oImg.src) InetGet ("$oImg", @DesktopDir) Next -
This forum was of no help so far so Ill give it one last chance.... How can I download a specific image from a webpage. I have a code that will show the number of images present on the webpage and all of their .scr However, how do i go about downloading an indexed image. I tried creating an array but that was of no luck. $oImgs = _IEImgGetCollection($oIE) $iNumImg = @extended MsgBox(0, "Img Info", "There are " & $iNumImg & " images on the page") For $oImg In $oImgs MsgBox(0, "Img Info " , "src=" & $oImg.src) InetGet ("$oImg", @DesktopDir) Next
-
save image based on image id
psychoblast replied to psychoblast's topic in AutoIt General Help and Support
i know how to download an image based on its url. but what If the url of the image changes while its id stays the same. Is there an option to save an image to a file based on its ID? -
is it possible? The url of an image changes every time, for example a video thumbnail. Could i download an image based on its id? which is the same all the time
-
How to get form ID from IE
psychoblast replied to psychoblast's topic in AutoIt General Help and Support
apologize for triple post but I solved it. Thanks for all your help :/ -
How to get form ID from IE
psychoblast replied to psychoblast's topic in AutoIt General Help and Support
Really close to getting it to work. Got the elements' names just one problem. If I want to comment i have to first click on the textbox i tried using IEAction and use click but it doesnt click on the textbox here is what I got: #include<IE.au3> _IEErrorHandlerRegister() _IELoadWaitTimeout(5000) $oIE=_IECreate("http://www.youtube.com/watch?v=JjmeSwPig_8",0,1,1) $oForm=_IEGetObjByName($oIE,"comment") _IEAction($oForm, "click") $oSubmit=_IEGetObjByName($oIE,"submit") _IEFormElementSetValue($oForm,"Thanks") _IEAction($oSubmit,"click") _IEErrorHandlerDeRegister() edit: got that to work usign IEAtction focus. but now the button won't click. Here is the latest script: #include<IE.au3> _IEErrorHandlerRegister() _IELoadWaitTimeout(5000) $oIE=_IECreate("http://www.youtube.com/watch?v=JjmeSwPig_8",0,1,1) $oForm=_IEGetObjByName($oIE,"comment") _IEAction($oForm, "focus") _IEFormSubmit($oForm) $oSubmit=_IEGetObjByName($oIE,"add_comment") _IEFormElementSetValue($oForm,"Thanks") _IEAction($oSubmit,"click") _IEErrorHandlerDeRegister() Only thing I seem to be missing is the name for the post button. any help finding it? -
Trying to make a youtube browser and need a script to be able to comment on youtube without actually clicking on the box and pressing comment. Here is what I have so far: #include <IE.au3> $oIE = _IECreate("http://www.youtube.com/watch?v=Nl4opbNt8_E") _IELoadWait($oIE) $oForm = _IEFormGetObjByName ($oIE, "textarea") $oQuery1 = _IEFormElementGetObjByName ($oForm, "comment") $uname="Yourusername" _IEFormElementSetValue ($oQuery1,$uname) $oForm1 = _IEFormGetCollection($oIE, 0) $oQuery = _IEFormElementGetCollection($oForm1, 1) might be way off but so far it opens up IE to a youtube video Cant seem to get the form ID for the textfield for the comment. also in google chrome when you click inspect element for the texfield I get this: <textarea onfocus="yt.www.comments.initForm(this);" class="yt-uix-form-textarea comments-textarea" name="comment"></textarea> Here I also have a similar script but I am not sure I am going in the right direction: #include <IE.au3> $oIE = _IECreate("http://www.youtube.com/watch?v=Nl4opbNt8_E") _IELoadWait($oIE) $oDoc = _IEDocGetObj($oIE) $oArray = $oDoc.getElementsByTagName ("input") For $element In $oArray If $element.Name = "comment" Then _IEFormElementSetValue($element, "hello") msgbox(0,"","Found it") Endif Next