Jump to content

MasonMill

Active Members
  • Posts

    233
  • Joined

  • Last visited

MasonMill's Achievements

Polymath

Polymath (5/7)

0

Reputation

  1. "{TAB}" seemed to just write {TAB} in the file but @TAB worked. Thanks guys for the help!
  2. If I want to concatenate strings for a tab delimited file how would I do so? It doesn't like FileWrite($FILE,$String1 & Send("{TAB}") & $String2 & Send("{TAB}") & $String3 & @CRLF) What is the procedure for something like this? Thanks, Mason
  3. Anyone have any ideas?
  4. If I want to see everything within an HTML source that I can grab with _IEFormGetCollection() or _IEFrameGetCollection() how do I display all objects I have collected? I am looking to fill text areas but can not find them. There are multiple text fields but I am only finding one form. here is the code I am using. Any information on the subject would be greatly appreciated. Local $oForms = _IEFormGetCollection($MyoIE, 0) Local $iNumForms = @extended dbg("Number of $oForms = "&$iNumForms) For $oForm in $oForms $oFormElements = _IEFormElementGetCollection($oForm) Local $iNumElementForms = @extended dbg("Number of $oFormElements = "&$iNumElementForms) Local $innertext = _IEPropertyGet($oForm, "innertext") dbg($innertext) If IsObj($oFormElements) Then For $oElement In $oFormElements If $oElement.Type = 'text' Then EndIf Next EndIf Next Thanks, Mason
  5. I dont know if these help but here is what they look like with my debugging tool. Subject line: email recipient: text body:
  6. Yeah, I was able to get in ok with this: Func _IEAutoLogin($sUrl, $sUsername, $sPwd) $oIE = _IECreate($sUrl) _IEErrorNotify(False) $oForms = _IEFormGetCollection($oIE) $Index = 0 For $oForm In $oForms $oFormElements = _IEFormElementGetCollection($oForm) If IsObj($oFormElements) Then $IndexElement = 0 For $oElement In $oFormElements Local $oDiv = _IEGetObjById($oIE, "line1") If $oElement.Type = 'password' Then $oPwd = _IEFormElementGetObjByName($oForm, $oElement.Name) _IEFormElementSetValue($oPwd, $sPwd) For $i = $IndexElement - 1 To 0 Step -1 $oUser = _IEFormElementGetCollection($oForm, $i) If $oUser.Type = 'text' Then _IEFormElementSetValue($oUser, $sUsername) ExitLoop EndIf Next If $oForm.action <> "0" And Not StringInStr($oForm.action, '.php') Then ;submit _IEFormSubmit($oForm, 0) _IELoadWait($oIE) Else ;click For $i = $IndexElement + 1 To $IndexElement + 10 ;check the next 10 elements $oButton = _IEFormElementGetCollection($oForm, $i) If $oButton.Type = 'submit' Then _IEAction($oButton, "click") ExitLoop EndIf Next EndIf EndIf $IndexElement += 1 Next EndIf $Index += 1 Next Return $oIE EndFunc ;==>_IEAutoLogin The problem is once I'm logged in and looking at the compose email screen I can't find the forms. If they are actually form i need to be looking for. If you are logged in the address is https://bay175.mail.live.com/default.aspx#page=Compose
  7. yeah, https://login.live.com/
  8. Hey everyone, I am have a ridiculous time trying to fill out my hotmail email within Internet Explorer. I dont want to use the SMPT rought and want to use my Hotmail login online to do so. I dont find the forms that I need to fill out, i.e. email subject field, email body text field and recipient email field. I dont have much experience with with all the IE stuff but have been working on it non stop for the past couple days. I dont know whether its because there is a frame surrounding the fields i want to fill or what. I look at the source but cant seem to find what I need. Any guidance would be appreciated. All I wont to do is fill out my email with a recipients email address, put a subject in and write the email text then send. I never thought it would be this difficult for me. Thanks in advance, Mason _IE_FillMyEmail($MyIEWindow) Func _IE_FillMyEmail($oIE) _IEErrorNotify(False) $oForms = _IEFormGetCollection($oIE) $Index = 0 For $oForm In $oForms $oFormElements = _IEFormElementGetCollection($oForm) If IsObj($oFormElements) Then dbg("IsObj($oFormElements) = true") dbg("Form Element Type: " & $oFormElements.type) $IndexElement = 0 For $oElement In $oFormElements dbg("Element Type: " & $oElement.type) dbg("Element Name: " & $oElement.name) ;If I could find what im looking for I would put what to fill out here Next Else dbg("IsObj($oFormElements) = false") EndIf $Index += 1 Next EndFunc ;==>fill out my email
  9. Awesome, thanks! I will give these a try tomorrow when I get back to work.
  10. Ive been having difficulty trying to devise a stringregexp search. Im looking through a webpage source and looking for titles. I know the string lies between <title> and </title> but they will all have different lengths with possibly any character. I can find them by: StringRegExp($Source,'/S(?:</title>)',3) then StringRegExp($Source,'/S/S(?:</title>)',3) etc etc but I dont know how to do: StringRegExp($Source,'(?:<title>)(put something here to fiund any string)(?:</title>)',3) Any ideas? Thanks in advance!
  11. hey guys, I looked through the help file functions to no avail. Is there a way to grab the array index instead of its value? Say like $somearray[0][1]=500 $somearray[0][2]=501 $somearray[0][3]=502 $somearray[1][1]=503 $somearray[1][2]=504 $somearray[1][3]=505 I want to use the first array index "$somearray[0][2]" as its index and not its value, so in this case 0. Next I would use "$somearray[1][2]" as 1. Is there a way to do this? I just dont want to create another set of variables to do this. Thnaks in advance, Mason
  12. Ahh, you have to define the style of window. Thank you very much!
  13. Hey Guys, I want to display the client window but when I use _ScreenCapture_CaptureWnd it captures the border and title bar and everything with it. Im trying to find coordinates of things relative to that client but I cant get it relative to the client becasue the window border is imaged too. I found a previous topic on the forums but the question was never answered. Any ideas? This is how I changed the example within the help file: Func Example() Local $hGUI, $hBMP, $hBitmap, $hGraphic, $hImage, $iX, $iY, $hClone, $fileloc=@ScriptDir&"\SOMEclient.bmp",$iLeft,$iTop,$iRight,$iBottom,$bCursor ; Create GUI $hGUI = GUICreate("GDI+", $ClientSize[0], $ClientSize[1]) GUISetState(@SW_SHOW) ; Initialize GDI+ library _GDIPlus_Startup() ; Capture 32 bit bitmap ;$hBMP = _ScreenCapture_Capture("") $hBMP = _ScreenCapture_CaptureWnd ( "" , $hSOMEclientWin ); MY AUGMENTATION!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! $hImage = _GDIPlus_BitmapCreateFromHBITMAP($hBMP) ; Create 24 bit bitmap clone $iX = _GDIPlus_ImageGetWidth($hImage) $iY = _GDIPlus_ImageGetHeight($hImage) $hClone = _GDIPlus_BitmapCloneArea($hImage, 0, 0, $iX, $iY, $GDIP_PXF24RGB) ; Save bitmap to file _GDIPlus_ImageSaveToFile($hClone, @ScriptDir & "\GDIPlus_Image.bmp") ; Clean up resources _GDIPlus_BitmapDispose($hClone) _GDIPlus_BitmapDispose($hImage) _WinAPI_DeleteObject($hBMP) ; Draw bitmap to GUI $hBitmap = _GDIPlus_BitmapCreateFromFile(@ScriptDir & "\GDIPlus_Image.bmp") $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGUI) _GDIPlus_GraphicsDrawImage($hGraphic, $hBitmap, 0, 0) ; Clean up resources _GDIPlus_GraphicsDispose($hGraphic) _GDIPlus_BitmapDispose($hBitmap) ; Shut down GDI+ library _GDIPlus_Shutdown() ; Loop until the user exits. Do Until GUIGetMsg() = $GUI_EVENT_CLOSE EndFunc ;==>Example Thanks, Mason
  14. Perfect, ive been looking around but couldnt find it, thanks!
  15. I have been looking in the help file but cant find a function that will tell me the width/height in pixels of an image. Im working with GUIs using the GDI stuff but cant find anything that i can define a variable with a width/height of some random image. Thanks in advance, Maosn
×
×
  • Create New...