Jump to content



Photo

Remote Gmail (UDF)

gmail udf email get retrieve send remote control receive mail

54 replies to this topic

#1 PhoenixXL

PhoenixXL

    Be what you are, believe me its always the BEST...

  • Active Members
  • PipPipPipPipPipPip
  • 1,337 posts

Posted 10 June 2012 - 02:54 PM

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
Posted Image
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

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
Attached File  v1.4 RemoteGmail.7z   12.56K   338 downloads
Previous Downloads : 338

Regards
Phoenix XL

Edited by PhoenixXL, 09 February 2013 - 08:44 AM.

  • Zoldex and Xandy like this







#2 PhoenixXL

PhoenixXL

    Be what you are, believe me its always the BEST...

  • Active Members
  • PipPipPipPipPipPip
  • 1,337 posts

Posted 29 June 2012 - 05:19 PM

24 Downloads yet no Reply
Please give me Feedback and Suggestions

Regards
Phoenix XL
  • BasicOs likes this
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.

#3 BasicOs

BasicOs

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 458 posts

Posted 16 October 2012 - 12:12 AM

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, 16 October 2012 - 12:27 AM.

Autoit.es - Foro Autoit en Español Word visitors Image Clustrmap image: Posted 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

#4 CptSpike

CptSpike

    Seeker

  • Active Members
  • 17 posts

Posted 18 October 2012 - 11:17 AM

This is pretty smart - I can see that this has great potential. Nice work.

-CptSpike

#5 PhoenixXL

PhoenixXL

    Be what you are, believe me its always the BEST...

  • Active Members
  • PipPipPipPipPipPip
  • 1,337 posts

Posted 24 October 2012 - 07:30 AM

v1.1 has been released
Check the First Post
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.

#6 PhoenixXL

PhoenixXL

    Be what you are, believe me its always the BEST...

  • Active Members
  • PipPipPipPipPipPip
  • 1,337 posts

Posted 24 October 2012 - 08:27 AM

hI, GREAT IDEA

Thanks BasicOS :)

Edited by PhoenixXL, 24 October 2012 - 09:03 AM.

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.

#7 PhoenixXL

PhoenixXL

    Be what you are, believe me its always the BEST...

  • Active Members
  • PipPipPipPipPipPip
  • 1,337 posts

Posted 24 October 2012 - 09:03 AM

thanks CptSpike :graduated:

Edited by PhoenixXL, 24 October 2012 - 09:03 AM.

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.

#8 PhoenixXL

PhoenixXL

    Be what you are, believe me its always the BEST...

  • Active Members
  • PipPipPipPipPipPip
  • 1,337 posts

Posted 27 October 2012 - 03:46 AM

oops forgot to add the script.. :rolleyes:
.
.

please check the first post
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.

#9 kkpmb

kkpmb

    Seeker

  • Normal Members
  • 1 posts

Posted 29 October 2012 - 07:08 AM

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?

#10 PhoenixXL

PhoenixXL

    Be what you are, believe me its always the BEST...

  • Active Members
  • PipPipPipPipPipPip
  • 1,337 posts

Posted 29 October 2012 - 07:56 AM

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, 21 December 2012 - 02:00 PM.

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.

#11 kiu

kiu

    Seeker

  • Normal Members
  • 5 posts

Posted 12 November 2012 - 01:41 AM

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, 12 November 2012 - 01:43 AM.


#12 PhoenixXL

PhoenixXL

    Be what you are, believe me its always the BEST...

  • Active Members
  • PipPipPipPipPipPip
  • 1,337 posts

Posted 12 November 2012 - 04:41 AM

Thanks kiu,
I have updated the UDF
please check the first post
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.

#13 yahaosoft

yahaosoft

    Seeker

  • Active Members
  • 18 posts

Posted 21 November 2012 - 10:34 AM

thank you for sharing it. :ILA2:
Thanksgiving...

#14 SherminatoR

SherminatoR

    Universalist

  • Active Members
  • PipPipPipPipPip
  • 287 posts

Posted 24 November 2012 - 10:32 AM

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 .

#15 water

water

    ?

  • MVPs
  • 10,707 posts

Posted 24 November 2012 - 10:44 AM

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.

UDFs:

Active Directory (2012-10-12 - Version 1.3.0.0 released) - Download - General Help & Support - Example Scripts - Wiki

OutlookEX (2012-10-07 - Version 0.9.0.0 released) - Download - General Help & Support - Example Scripts - Wiki

ExcelChart (2013-01-21 - Version 0.3.1.1 released) - Download - General Help & Support - Example Scripts

WordEX (2012-12-29 - Version 1.3 released) - Download

ExcelEX (2013-05-11 - Alpha 4 released) - Download


#16 water

water

    ?

  • MVPs
  • 10,707 posts

Posted 24 November 2012 - 11:03 AM

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.

UDFs:

Active Directory (2012-10-12 - Version 1.3.0.0 released) - Download - General Help & Support - Example Scripts - Wiki

OutlookEX (2012-10-07 - Version 0.9.0.0 released) - Download - General Help & Support - Example Scripts - Wiki

ExcelChart (2013-01-21 - Version 0.3.1.1 released) - Download - General Help & Support - Example Scripts

WordEX (2012-12-29 - Version 1.3 released) - Download

ExcelEX (2013-05-11 - Alpha 4 released) - Download


#17 SherminatoR

SherminatoR

    Universalist

  • Active Members
  • PipPipPipPipPip
  • 287 posts

Posted 24 November 2012 - 11:34 AM

Thats strange. I get errors from udf. Need to check my autoit version. Also my win is xp.

#18 water

water

    ?

  • MVPs
  • 10,707 posts

Posted 24 November 2012 - 11:40 AM

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

UDFs:

Active Directory (2012-10-12 - Version 1.3.0.0 released) - Download - General Help & Support - Example Scripts - Wiki

OutlookEX (2012-10-07 - Version 0.9.0.0 released) - Download - General Help & Support - Example Scripts - Wiki

ExcelChart (2013-01-21 - Version 0.3.1.1 released) - Download - General Help & Support - Example Scripts

WordEX (2012-12-29 - Version 1.3 released) - Download

ExcelEX (2013-05-11 - Alpha 4 released) - Download


#19 water

water

    ?

  • MVPs
  • 10,707 posts

Posted 24 November 2012 - 11:49 AM

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:
AutoIt         
#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, 24 November 2012 - 11:51 AM.

UDFs:

Active Directory (2012-10-12 - Version 1.3.0.0 released) - Download - General Help & Support - Example Scripts - Wiki

OutlookEX (2012-10-07 - Version 0.9.0.0 released) - Download - General Help & Support - Example Scripts - Wiki

ExcelChart (2013-01-21 - Version 0.3.1.1 released) - Download - General Help & Support - Example Scripts

WordEX (2012-12-29 - Version 1.3 released) - Download

ExcelEX (2013-05-11 - Alpha 4 released) - Download


#20 SherminatoR

SherminatoR

    Universalist

  • Active Members
  • PipPipPipPipPip
  • 287 posts

Posted 24 November 2012 - 12:04 PM

Thanks!So stupid mistake. When I tried to put that variables before includes then I got errors from string.au3..





Also tagged with one or more of these keywords: gmail, udf, email, get, retrieve, send, remote, control, receive, mail

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users