Jump to content

Recommended Posts

Remote Gmail UDF


Working
It uses the Google atom API to get the Summary of the mail,
The Summary of the mail is enough to get a direct link or a single function with parameters
Execute any Function (or Script) and get the Return Values in your E-mail

Requirements

  • Gmail (Email) Account
  • A Remote Computer with Internet Access

Representation
remotegmail.png
Functions

  • You can now use you Gmail account to use Autoit Functions in a remote computer
  • Can execute a function through reading the email.
  • Can Email back the return values of an executed function.
  • The parameter can even be a variable present in the script [see Syntax]
  • Execute a Script through Direct Link.
  • Execute multiple scripts zipped together through Direct Link.
  • Can Email back the PID of the running executables with the scripts.
  • Attach any file and get it in your email.
  • Able to send the multiple attachments zipped together.
  • Writes all the return values in a Log file.
  • No email is executed twice, the Message IDs are stored for this purpose.

Future Updates

  • Support single line nesting
  • Get the attachment, to execute the script

Syntax

Syntax for Functions
PXL<FuncName>: (<data type>)<first param part a>+(<data type>)<first param part b>|(<data type>)<secondparam>/PXL

Colon[:] - Separation of Function Name with the Parameters
Bar [ | ] - Separation of different parameters
Plus [+] - To Concatenate Values
PXL /PXL - The tags where the code is enclosed
Brackets [ () ] - For specifying the type of the parameter

DataTypes - Always Preceded by any parameter and are enclosed with brackets

; | (s) - String
; | (n) - Number
; | (f) - Floating Number
; | (i) - Integer
; | (b ) - Binary
; | (v) - Variable
; | (h) - Hex
; | (m) - macro
; | (w) - Handle
; | (p) - Pointer


Syntax for Direct Links
PXL<DirectLink>^<Type>/PXL

PXL /PXL - The tags where the code is enclosed
Caret [ ^ ] - To Separate the Link and the Type
Type - Either Zip or au3

DirectLink WebServer
Some of webservers providing Direct Links
DropBox [Tested - Recommended]
Herosh [Tested]*
FileToLink
FileDen

* DirectLink from Herosh changes therefore Example 4 wont work after a while

Credits
CaptainClucks - Atom Feed
Jos - SMTP Mailer
wraithdu - Zip UDF

Change Log
v1.0 - First Release
v1.1 - Added Script Execution with Zipping Functionality
v1.2 - Fixed some Minor bugs
v1.3 - Added RemoteGmail_Startup
v1.4 - Fixed Compiling Issues

v1.5 - Added flexibility for execution of scripts from any email.

The UDF - Download
The UDF is currently tested on x86
All Comments ,Queries , Feedback and Advice are welcomed... :)
The UDF with the Examples have been compiled in the following Zip

v1.5 RemoteGmail.7z
Previous Downloads : 1119

Regards
Phoenix XL

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.

Link to comment
Share on other sites

  • 3 weeks later...

24 Downloads yet no Reply

Please give me Feedback and Suggestions

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.

Link to comment
Share on other sites

  • 3 months later...

hI, GREAT IDEA, you can have a look AT mine here, similar THAN yours, but using a mysql db instead, it includes also a browser link to work for starting the script from an IPHONE-ANDROID smartphone --> INTO a autoit APP Client(via php and mysql and this remote Autoit app client)

I write there a link also for another internet "automator".

I posted your script-link in our Autoit SPANISH SUPPORT GROUP FORUM HERE:

LINK

THANKS

SALUDOS

PD: España-France Football MATch IS tomorrow.

Edited by BasicOs
Autoit.es - Foro Autoit en Español Word visitors Image Clustrmap image: - Football Spanish team - Spanish team: Casillas, Iniesta, Villa, Xavi, Puyol, Campdevilla, etc..Programando en Autoit+Html - Coding Autoit-Html - Arranca programas desde Internet - Preprocesador de Autoit a http
Link to comment
Share on other sites

v1.1 has been released

Check the First Post

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.

Link to comment
Share on other sites

hI, GREAT IDEA

Thanks BasicOS :) 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.

Link to comment
Share on other sites

thanks CptSpike :graduated:

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.

Link to comment
Share on other sites

oops forgot to add the script.. :rolleyes:

.

.

please check the first post

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.

Link to comment
Share on other sites

Hi Phoenix, a good tool for administering network remotely. I downloaded, but could not understand how to go configuring remote computers and put them in to listening mode.

Is there any help file showing how to start?

Link to comment
Share on other sites

This will help you achieve a continuous loop to check and execute the emails till the compter isnt turned off or the Process isnt killed

;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 = '********' ; 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

Just give your username and password

Send yourself an email with your email address and get the script or Function executed

One more tip : to execute the mails when user goes idle check Idle Process in my Signature

Regards

Phoenix XL

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.

Link to comment
Share on other sites

  • 2 weeks later...

Hello Pheonix

I found a bug; it's in the part where _ExecuteFromEmail function is calling _GetfromDirectLink function; first parameter contains the ^zip in it so the link is incorrect; _GetfromDirectLink function do'nt catch the error, so _ExecuteFromEmail crashes because $nArrays is not a array. My correction (simplest for me) was this:

Local $nFile = GetfromDirectLink(StringTrimRight($sExecute, 4), @ScriptDir &amp; 'Temp.' &amp; $nType)

Anyway, great job, i was using a script similar with this, but yours is much better; thank you, and maybe we'll expand it; I have some ideas, but I will post them later.

Thanks , Paul

edit: sorry for my bad english

Edited by kiu
Link to comment
Share on other sites

Thanks kiu,

I have updated the UDF

please check the first post

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.

Link to comment
Share on other sites

  • 2 weeks later...

When I try to start any code i get error from string.au3

Func _HexToString($strHex)

If StringLeft($strHex, 2) = "0x" Then Return BinaryToString($strHex)

Return BinaryToString("0x" & $strHex)

EndFunc ;==>_HexToString

Its says that missing wend, endswitch. I try to change something and I get errors from remotegmail.au3 .

I make ant imput box with button. I want to put there text, click button and get text into gmail .

Link to comment
Share on other sites

Such messages are (most of the time) not caused by the UDF but by the user code missing a closing quote or something like that.

Running Tidy has often shown where the problem is.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Just tried your script you sent me by PM and it works fine. Autoit 3.3.8.1, latest GMail UDF. Running on Windows 7 64 bit.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Can you post the output of the SciTE console pane? Which error messages do you get there? Line number etc?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

C:Documents and SettingsxxxxDesktopRemoteGmailv1.2 RemoteGmailRemoteGmail.au3(10,29) : WARNING: $sUsername: possibly used before declaration.
Global $sEmail = $sUsername &
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:Documents and SettingsxxxxDesktopRemoteGmailv1.2 RemoteGmailRemoteGmail.au3(60,53) : WARNING: $sPassword: possibly used before declaration.
Local $eReturn = _CheckGmail($sUsername, $sPassword,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:Documents and SettingsxxxxDesktopRemoteGmailv1.2 RemoteGmailTest.au3 - 0 error(s), 2 warning(s)
->13:41:40 AU3Check ended. Press F4 to jump to next error.rc:1
>Running:(3.3.8.1):C:Program FilesAutoIt3autoit3.exe "C:Documents and SettingsxxxxDesktopRemoteGmailv1.2 RemoteGmailTest.au3"
--> Press Ctrl+Alt+F5 to Restart or Ctrl+Break to Stop
C:Documents and SettingsxxxxDesktopRemoteGmailv1.2 RemoteGmailRemoteGmail.au3 (10) : ==> Variable used without being declared.:
Global $sEmail = $sUsername & '@gmail.com'
Global $sEmail = ^ ERROR
->13:41:40 AutoIT3.exe ended.rc:1
>Exit code: 1 Time: 2.618
You access a variable ($sUsername) before it has been declared. Move the variable declaration/assignment to the top of your script (before the GMail include) and the error should go away:

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

Global $sUsername = "myemail"
Global $sPassword = "password"
Global $texttosend

#include <RemoteGmail.au3>

#region ### START Koda GUI section ### Form=
GUICreate("Test", 300, 72, 296, 260)
$Input1 = GUICtrlCreateInput("Put some text", 8, 8, 281, 21)
$send = GUICtrlCreateButton("Send Gmail", 8, 32, 283, 25)
GUISetState(@SW_SHOW)
#endregion ### END Koda GUI section ###

While 1
$nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
          Exit
        Case $send
            $texttosend = GUICtrlRead($Input1)
            SendEmail2Gmail($texttosend, '', 0, 'Execute')
    EndSwitch
WEnd
Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
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
 Share

×
×
  • Create New...