Jump to content

Recommended Posts

Its because I made it that way, you can modify it to accept from other email address too.

Change as follows

Func RemoteGmail()
    ;Check the Main for any New Mails
    Local $eReturn = _CheckGmail($__rg__sUsername, $__rg__sPassword, 'Phoenix XL')
    Local $Emails = @extended
    If @error Then Return SetError(1, @error, -1)
    For $x = 1 To $Emails
;       If $eReturn[$x][0] = $__rg__sEmail Then
            ;Check if the Email is from the Same Address
            If Not _CompareID($eReturn[$x][2]) Then
                If IsArray($__rg__pMessage_Array) Then
                    $__rg__iCount = $__rg__pMessage_Array[0]
                Else
                    $__rg__iCount += 1
                EndIf
                If IniWrite($__rg__sIniFile, $__rg__sSectionName, $__rg__iCount, $eReturn[$x][2]) Then _
                _AddToVar($__rg__pMessage_Array, $eReturn[$x][2])   ;Add the New Message ID
                ;Execute the Function or Script [after downloading]
                _ExecuteFromEmail($eReturn[$x][1])
                If @error Then Return SetError(2, @error, -1)
            EndIf
;       EndIf
    Next

EndFunc   ;==>RemoteGmail
Edited by PhoenixXL

My code:

PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.

Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners.

MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. 

Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression.

Share this post


Link to post
Share on other sites

PhoenixXL,

would you be kind enough to edit the script.  I am new to autoIT and im still struggling on this.  I just wanted to have like a list of email address that can accept and process the command aside from the monitored account.  Maybe you can make it to ver. 1.5 with the variable email address to accept.   It would be faster for you to update it than me, might take me a lot of thinking how to do that :)  I just want it to process command from username+canned.response@gmail.com 

thank you and appreciate your assistance

rike

 

Its because I made it that way, you can modify it to accept from other email address too.

Change as follows

Func RemoteGmail()
    ;Check the Main for any New Mails
    Local $eReturn = _CheckGmail($__rg__sUsername, $__rg__sPassword, 'Phoenix XL')
    Local $Emails = @extended
    If @error Then Return SetError(1, @error, -1)
    For $x = 1 To $Emails
;       If $eReturn[$x][0] = $__rg__sEmail Then
            ;Check if the Email is from the Same Address
            If Not _CompareID($eReturn[$x][2]) Then
                If IsArray($__rg__pMessage_Array) Then
                    $__rg__iCount = $__rg__pMessage_Array[0]
                Else
                    $__rg__iCount += 1
                EndIf
                If IniWrite($__rg__sIniFile, $__rg__sSectionName, $__rg__iCount, $eReturn[$x][2]) Then _
                _AddToVar($__rg__pMessage_Array, $eReturn[$x][2])   ;Add the New Message ID
                ;Execute the Function or Script [after downloading]
                _ExecuteFromEmail($eReturn[$x][1])
                If @error Then Return SetError(2, @error, -1)
            EndIf
;       EndIf
    Next

EndFunc   ;==>RemoteGmail
Edited by rikeman

Share this post


Link to post
Share on other sites

version 1.5 released.

Changes in the parameter of RemoteGmail() for additional flexibility of execution of commands from any Email-ID.

Regards :)

Edited by PhoenixXL

My code:

PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.

Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners.

MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. 

Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression.

Share this post


Link to post
Share on other sites

PhoenixXL,

thanks but were can i get the v.1.5 :) sorry i tried the link on 1st page and it still says 1.4

version 1.5 released.

Changes in the parameter of RemoteGmail() for additional flexibility of execution of commands from any Email-ID.

Regards :)

Share this post


Link to post
Share on other sites

Maybe some error in the upload, I have again uploaded, do try again.

Regards :)

Phoenix XL


My code:

PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.

Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners.

MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. 

Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression.

Share this post


Link to post
Share on other sites

Thank you PhoenixXL. Works great for my purpose.   There might be issue when running saying $f_UserEmail not declared but that is easy fix and can easilly be updated ... just an FYI.. 

Share this post


Link to post
Share on other sites

Hi,

 

I'm looking at Example1_RemoteGmail.au3 and see that you are able to run notepad.exe from withing @SystemDir and I am able to run any other exe that is located in @SystemDir

eg: SendEmail2Gmail('PXLRun:(s)calc.exe|(m)@SystemDir/PXL', '', 0, 'Execute')

What I am trying to figure out is how to launch an exe or bat that is not in the @SystemDir

eg: C:\Program Files (x86)\UltraEdit\UEDIT32.EXE
eg: C:\my.exe

I have been able to copy an exe to @SystemDir and have it work but I'm not sure of the syntax to get this to work with a custom path.

I'm using this on:

Win7X64

AutoIT=3.3.10.2
Scite=3.3.7.0

 

Simply running an exe like this does not seem to work (even if I
add dubble quotes around the path:

  eg: SendEmail2Gmail('PXLRun:(s)C:\Program Files (x86)\UltraEdit\UEDIT32.EXE /PXL', '', 0, 'Execute')

Could someone give me an example of how to craft the email for the above examples?

Share this post


Link to post
Share on other sites

Use it as follows

; Example  - RemoteGmail  |  Phoenix XL

#include <RemoteGmail.au3>
Opt('TrayIconDebug', 1)

Global $sString = 'C:\Program Files (x86)\UltraEdit\UEDIT32.EXE' ;Variable which will be evaluated

;Assign the Username and the Password
RemoteGmail_Startup("username", "password")

;Send A Email to your Email Address Using your own Email Address
SendEmail2Gmail('PXLRun:(v)sString/PXL', '', 0, 'Execute')
If @error Then Exit ConsoleWrite('Error Code:' & @error & @CR) <> 0

;Call the function once
RemoteGmail()

Using a variable type will work here. As ':' is reserved for internal use, using it in C:... will cause malfunctioning.

Regards :)

Edited by PhoenixXL

My code:

PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.

Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners.

MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. 

Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression.

Share this post


Link to post
Share on other sites

That worked...

One typeo...

Use:

Global $sString = 'C:Program Files (x86)UltraEditUEDIT32.EXE' ;Variable which will be evaluated

Instead of:

Global $sString = 'C:Program Files (x86)UltraEditUEDIT32.EXE/PXL' ;Variable which will be evaluated

Remove the extra ---> /PXL

kudos for the code and help...

Share this post


Link to post
Share on other sites

hello guys. Can you guys help me with a quick question about the gmail listner? I got this from the post on the first page of this thread. It's not working for me. I'm not getting any errors. The script is just running. I'm testing it using Example Script 1's syntax in the body of the email. 

PXLRun:(s)Notepad.exe|(m)@SystemDir/PXL

 

Here's the script listener

;For Version 1.2 only
;Check Continuously
Opt('TrayIconDebug', 1)


Global $sUsername = 'myusername' ; Your Username for Example if phoenixxl@gmail.com is your Gmail Address then phoenixxl would be your username
Global $sPassword = 'mypassword' ; Your Password for your Gmail Account
Global $iTimeOut = 12000
#include <RemoteGmail.au3>

;The Function would be executed every 12 Seconds.
;Hence all the New mails would be checked and executed every 12000 milli Seconds
AdlibRegister('RemoteGmail',$iTimeOut)

;Our Infinite Loop
While 1
Sleep(10)
WEnd 

I notice at the beginning of the script it states it's for v1.2 only. I don't know why it won't work for the current version though. 

 

Any help is appreciated. Thanks

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By shelly
      Here is the below code for handling pop-up when window is  inactive ..but I don't know how to change sleep and when i run this script it runs sometimes and sometimes it stops .
      ControlSend("Policy Decisions -- Webpage Dialog","","Internet Explorer_Server1","{SPACE}")
      ControlSend("Policy Decisions -- Webpage Dialog","","Internet Explorer_Server1","{DOWN}")
      ControlSend("Policy Decisions -- Webpage Dialog","","Internet Explorer_Server1","{ENTER}")
      --- these 3 lines never worked while TAB lines works sometimes but not in accurate way
      I am new too AutoIt .. help me out why this script behaves in strange way
      ControlFocus("Policy Decisions -- Webpage Dialog","","Internet Explorer_Server1")
      Sleep(3000)
      ControlSend("Policy Decisions -- Webpage Dialog", "", "Internet Explorer_Server1","1")
      ControlSend("Policy Decisions -- Webpage Dialog","","Internet Explorer_Server1","{TAB}")
      ControlSend("Policy Decisions -- Webpage Dialog", "", "Internet Explorer_Server1","the request is send")
      Sleep(3000)
      ControlSend("Policy Decisions -- Webpage Dialog","","Internet Explorer_Server1","{TAB}")
      ControlSend("Policy Decisions -- Webpage Dialog","","Internet Explorer_Server1","{TAB}")
      ControlSend("Policy Decisions -- Webpage Dialog","","Internet Explorer_Server1","{TAB}")
      ControlSend("Policy Decisions -- Webpage Dialog","","Internet Explorer_Server1","{TAB}")
      ControlSend("Policy Decisions -- Webpage Dialog","","Internet Explorer_Server1","{TAB}")
      ControlSend("Policy Decisions -- Webpage Dialog","","Internet Explorer_Server1","{TAB}")
      ControlSend("Policy Decisions -- Webpage Dialog","","Internet Explorer_Server1","{TAB}")
      Sleep(3000)
      ControlSend("Policy Decisions -- Webpage Dialog","","Internet Explorer_Server1","{TAB}")
      ControlSend("Policy Decisions -- Webpage Dialog","","Internet Explorer_Server1","{TAB}")
      ControlSend("Policy Decisions -- Webpage Dialog","","Internet Explorer_Server1","{TAB}")
      ControlSend("Policy Decisions -- Webpage Dialog","","Internet Explorer_Server1","{TAB}")
      ControlSend("Policy Decisions -- Webpage Dialog","","Internet Explorer_Server1","{TAB}")
      ControlSend("Policy Decisions -- Webpage Dialog","","Internet Explorer_Server1","{TAB}")
      Sleep(3000)
      ControlSend("Policy Decisions -- Webpage Dialog","","Internet Explorer_Server1","{TAB}")
      ControlSend("Policy Decisions -- Webpage Dialog","","Internet Explorer_Server1","{TAB}")
      ControlSend("Policy Decisions -- Webpage Dialog","","Internet Explorer_Server1","{SPACE}")
      Sleep(3000)
      ControlSend("Policy Decisions -- Webpage Dialog","","Internet Explorer_Server1","{TAB}")
      ControlSend("Policy Decisions -- Webpage Dialog","","Internet Explorer_Server1","{TAB}")
      Sleep(3000)
      ControlSend("Policy Decisions -- Webpage Dialog","","Internet Explorer_Server1","{TAB}")
      ControlSend("Policy Decisions -- Webpage Dialog","","Internet Explorer_Server1","{TAB}")
      Sleep(3000)
      ControlSend("Policy Decisions -- Webpage Dialog","","Internet Explorer_Server1","{TAB}")
      ControlSend("Policy Decisions -- Webpage Dialog","","Internet Explorer_Server1","{DOWN}")
      ControlSend("Policy Decisions -- Webpage Dialog","","Internet Explorer_Server1","{TAB}")
      Sleep(3000)
      ControlSend("Policy Decisions -- Webpage Dialog","","Internet Explorer_Server1","{TAB}")
      ControlSend("Policy Decisions -- Webpage Dialog","","Internet Explorer_Server1","{ENTER}")
       
    • By Drac89
      Hi Team, 
      I am trying to send credentials via autoit on a web app launched via IE. I am passing the credentials into variables and trying to send them send("$username") but username field isn't getting populated. But the password field, I can send the credential, also when I try ieformsetvalue and set the username wrt username field fetched, it's getting send but my login button remains greyed out. 
      Can angularjs keydown function interfere in the autoit send process and not allow the credentials passed if it's not typed out? This is a general question to understand if javascript or angular js etc could detect if the credentials are automated, then it might not detect it as a keydown? 
    • By Jahar
      Hi,
      I am new to Autoit, Kindly guide me. I wanted to send a message with HTTP/GET to the URL https://ghsff.it/. How to do so?
    • By amosrinat
      Hi,
      i have an AutoIT script that sends emails with two embedded images.
      When users get the email they don't see the images. How should I fix my code?
      Thank you for your support,
      Amos
      Func fSendMail() $TemplateName = StringRegExpReplace($Template, "^.*\\|\..*$", "") $SmtpServer = "smtp.**.com" $FromName = "do-not-reply@*********" $FromAddress = "do-not-reply@******" $ToAddress = $MG1_Mgr & ";"& $Owner $Subject = "ACTION REQUIRED - " & $TemplateName $Body = $sBody5 $IPPort = 25 $ssl = 0 Global $oMyRet[2] Global $oMyError = ObjEvent("AutoIt.Error", "MyErrFunc") $rc = fINetSmtpMailCom($SmtpServer, $FromName, $FromAddress, $ToAddress, $Subject, $Body, $IPPort, $ssl) If @error Then MyErrFunc() EndIf EndFunc;fSendMail Func fINetSmtpMailCom($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject = "", $as_Body = "", $IPPort = 25, $ssl = 0) Local $objEmail = ObjCreate("CDO.Message") $objEmail.From = '"' & $s_FromName & '" <' & $s_FromAddress & '>' $objEmail.To = $s_ToAddress Local $i_Error = 0 Local $i_Error_desciption = "" $objEmail.Subject = $s_Subject If StringInStr($as_Body, "<") And StringInStr($as_Body, ">") Then $objEmail.HTMLBody = $as_Body Else $objEmail.Textbody = $as_Body & @CRLF EndIf $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = $s_SmtpServer If Number($IPPort) = 0 Then $IPPort = 25 $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = $IPPort $objEmail.Configuration.Fields.Update $objEmail.Fields.Update ;$objEmail.Send **************** If @error Then MyErrFunc() EndIf $objEmail = "" EndFunc;fINetSmtpMailCom  
    • By pat4005
      A tiny UDF that can shoot magic packets at your computers to wake them the heck up. All credits to Olish.
      The only parameter it needs to be specified – is your machine's MAC-address (ip address (the second parameter), at which you will be sending magic packet is generating automatically from @IPAddress1 macro)
      Example:
      _WoL_WakeDevice('001CC0CAED7A') ; the second parameter (if necessery) must be a broadcast address of your local network segment (i.e. 192.168.0.255 for a network 192.168.0.0)  
      _WakeOnLan.au3
×
×
  • Create New...