Sign in to follow this  
Followers 0
PinetSebastien

How to modify certain part of an email template.

6 posts in this topic

Hi,

I currently have a working Script that opens an email templates, insert strings on certain lines, and remove other lines.

It looks like the image below.

But the way I do it is that I send Keys to the CTRLid, so  something like DOWN 6 times, BS 9 times, type this or that string.

It works fine but there is one problem.

If the window of the email template is smaller ( like you can see on the 2nd image ), there is more line, so my script does not work anymore.

So my question is, how can I change certain lines on the email template in a way that it will work whoever or big or small the window is?

 

o3eo1dk.png

 

 

dete3Pm.pngffffd

Share this post


Link to post
Share on other sites



Post your script so we can have a look ;)


Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Share this post


Link to post
Share on other sites
ControlFocus ( " Secret window name ", " Text ID " , "[CLASS:_WwG; INSTANCE:1]" )
ControlSend( " Secret window name ", " Text ID " , "[CLASS:_WwG; INSTANCE:1]" , "{Down 6}{END}{SHIFTDOWN}{LEFT 8}{SHIFTUP}" )
ControlSend( " Secret window name ", " Text ID " , "[CLASS:_WwG; INSTANCE:1]" , $password )

It can`t really do it because it contains confidential information.

But it goes like that.

Again it only works if the window is maximized.

Or else there is more line, So my "down 6times* does not go the same line as another employe who has a smaller screen resolution. 

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Why not just:

ControlGetPos() ; use this to get the current pos of the window
GUICtrlSetPos() ; use this to set the window to a pos

before the ControlFocus and Sends.

EDIT: Then when your script completes you can use the ControlGetPos to set the window back to how it was before you sent.

Edited by MikahS

Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Share this post


Link to post
Share on other sites

Sounds like a great idea.

I'll try that.

I'll let you know.

Thank you very much :)

1 person likes this

Share this post


Link to post
Share on other sites

Anytime ;)

1 person likes this

Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

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  
Followers 0