Jump to content

KingNED

Active Members
  • Posts

    30
  • Joined

  • Last visited

Everything posted by KingNED

  1. Hi guys, I'm experiencing a weird thing here... if i run this code: $Outlook = ObjCreate('Outlook.Application') $namespace = $Outlook.GetNamespace("MAPI") $folder = $namespace.Folders("Foldername") $inbox = $folder.Folders("Inbox") $moveto = $inbox.Folders("Processed") ConsoleWrite("Mail Count: " & $inbox.Items.Count & @CRLF) For $item In $inbox.Items ConsoleWrite("-> " & $item.Subject & @CRLF) GetArrayFromMailVars($item.Body) If Not @error Then $item.Move($moveto) ConsoleWrite("File Processed. " & @HOUR & ":" & @MIN & @CRLF) Else ConsoleWrite(@error) EndIf Next The code seems to stop after 2 mails, even though there are more in there. I have to keep recalling that function to do two mails at a time. Now I've found one method to make it do all mails in just one time, but it means I have to comment the $item.Move($moveto) line. Has anyone of you encountered this before and/or knows a fix? Thanks in advance
  2. Try this: Run(@ComSpec & " /c " & 'c:\php\php script.php', "", @SW_HIDE) AutoIt wants the @ ComSpec & " /c "
  3. If you go to the Listentoyoutube homepage you can add the video you want to their database just insert the link, tick the High Quality circle thingy, and let it convert. Even that is quite quick actually...
  4. This should be it: HotKeySet('{F1}', '_myFunc') Func _myFunc() Send('{TAB}') ConsoleWrite('TAB Pressed!') EndFunc While 1 Sleep(10) WEnd
  5. Bullguard, or any AV that uses the BitDefender engine, doesn't see AU3 scripts, nor the installer as a virus. If you do some odd malicious code, then yes, it will be detected as a virus, but not the normal scripts. Besides the one-time 'See every component of windows and every running process as Win32/FakeTrojan.5 (or something, don't remember the exact name lol)', its been perfect.
  6. $clickme = _IEGetObjByName($oIE, 'MENU_JOB') _IEAction($clickme, 'click') try that, should work.
  7. Are you sure you got the title right in the script? maybe post the section so we can see where it goes wrong?
  8. You should try ObjCreate()
  9. Fixed it, I now look with WinExists if the second instance of the object exists, then do $sapnum (which is $sap_window_num but then in another variable to not change the global) += 1, and hey, it works! Me's happy Thanks for this great UDF
  10. Been using this UDF lately, works quite nicely, though there are some transactions that give you a popup box instead of displaying it on the regular page, that causes a problem, since it's not attaching to the popup, and causes an error. *edit: Both screens have the same title* $sap_session.findById("wnd[" & $sap_window_num & "]/" & $object_id).text = $object_value $sap_session.findById("wnd[" & $sap_window_num & "]/" & $object_id)^ ERROR The $sap_window_num should go up 1, then it 'should' work. Any tricks available to find out whether one of the $sap_window_num's work? thanks in advance
  11. lol hey Almighty Almar XD Now you see what I do during work
  12. _OutlookDeleteMail($oOutlook, $sFolder = "\Junk E-Mail", $fDeleteMultipleMail = True, $fRemoveFromDeletedItems = False) should be: _OutlookDeleteMail($oOutlook,"\Junk E-Mail",'','', '', true, false)
  13. Checked that already... ReadTEXT isn't really an option since that will do everything, i just need the password: *value* section stripped.
  14. Hi guys, I've been working on my script for quite some time, now I've found something I cannot solve on my own. After my script fills in certain details, the page will refresh, and show a password on it. Now it's my task, to find the line containing: 'Password: *somerandompassword*' Do you guys know of any way I could get this? Thanks in advance
  15. Thanks I've been working on the code now, and it is working quite well, it now reads the mail, and puts everything in an associative array. quick, easy access without the problem of having the values in the wrong positions. Also made a function out of it so it can just keep checking it the entire time. #include <Outlook.au3> #include <AssocArrays.au3> HotKeySet("^!x", "FuncExit") Func ProcessMail() $avArray="" AssocArrayCreate($avArray, 10) $oOutlook = _OutlookOpen() $getMail = _OutlookGetMail($oOutlook, "\traag", False, "", "", "", "", "ReadMailAU3 test") If @error > 0 Then MsgBox(4096,"Get Mail Error",@error,600) $bodyArray = StringRegExp($getMail[1][9],"(.*?:.*)(?:\v|\z)",3) ;_ArrayDisplay($bodyArray) FOR $result IN $bodyArray $result2 = StringSplit(StringStripWS($result,BitOR(1,2,4)), ": ", 1) AssocArrayAssign($avArray, $result2[1], $result2[2]) ;_ArrayDisplay($result2) Next $asKeys = AssocArrayKeys($avArray) $sName = "" For $iCount = 0 To UBound($asKeys) - 1 $sName &= "[" & $asKeys[$iCount] & "] = " & AssocArrayGet($avArray, $asKeys[$iCount]) & @CR Next MsgBox(64, "AssocArray Test", $sName) _OutlookClose() EndFunc While 1=1 ProcessMail() Sleep(20000) WEnd Func FuncExit() Exit EndFunc
  16. Maybe you can create a function that will move the mail to another folder?
  17. That returns: [0]|Var1: Value1Var2: Value2Var3: Value3Variable: Value that's *partially* what i need, now i need, that it reads fields like: Name: Value1 Address: Value2 Telephone: Value3 E-mail: in whatever sequence they come in, put the Value things which can be just about anything, into an array so i can process it further. like: [0]Value1 [1]Value2 [2]Value3 etc *While keeping the values in the correct order, so if name comes at the bottom, it should still be in it's original place in the array. *the array should always have to values in the same place.
  18. $toread is email number 1, part 9 (the body of the mail) i've found a partial fix, but it involves modifying the mail itself before sending it. By sending it as plain text, it'll only get the things needed, but with one white spot in the array again at the end. Since customers also have to use this, it isn't really something that we want to do that way. it seems that somehow the mail being sent as HTML is creating a problem for it.
  19. I'm trying to get a mail read out using the Outlook include, and read certain variables into an array. the basics work, but the array seems to be misbehaving to me $oOutlook = _OutlookOpen() $getMail = _OutlookGetMail($oOutlook, "\altbox", False, "", "", "", "", "ReadMailAU3 test") If @error > 0 Then MsgBox(4096,"Get Mail Error",@error,600) $toread = $getMail[1][9] $bodyArray = StringSplit($toread), @CR) _ArrayDisplay($bodyArray) but then what it returns is: [0]|6 [1]|Var1: value1 [2]| [3]|Var2: value2 [4]| [5]|Var3: value3 [6]| What I'm trying to achieve is get only: [0] # of entries [1]Value1 [2]Value2 [3]Value3 Any help would be appreciated
×
×
  • Create New...