Blue Eye Logo

Blue Eye Macro

Automation is freedom
It is currently Wed Dec 19, 2018 11:13 am

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: About Text Files.
Thanked: 0 time(s)  Unread post Posted: Mon Oct 16, 2017 10:38 pm 
VIP Contributor
VIP Contributor
User avatar



Joined: Fri Nov 01, 2013 10:45 pm
Posts: 841
Location: Egypt , Portsaid
Been thanked: 241 time(s)
Has thanked: 10 time(s)
Contribution Points: 1997
is it Possible to Import A Function from a Text File And Execute it ?!
Ex:
Code:
 if  Window.Confirmation dialog gets confirmed by user("Do You Want To Use Function ?!")
               begin
IN HERE Read a File TEXT and Automatically add it in another Macro to get Executed
end

if it's Not Possible i hope u add it in the Future Update .
Thanks

_________________
--------------------------------------------------------------------------------
All Of My Scripts Can Be Found in Here !!!
viewtopic.php?f=304&p=190914
--------------------------------------------------------------------------------


Top
 Profile  
Reply with quote  
 Post subject: Re: About Text Files.
Thanked: 0 time(s)  Unread post Posted: Tue Oct 17, 2017 7:03 am 
Partner / License admin
Partner / License admin
User avatar



Joined: Sun Oct 10, 2010 5:16 pm
Posts: 1842
Location: USA
Been thanked: 393 time(s)
Has thanked: 33 time(s)
Contribution Points: 16383
How would you use it that would be different from the current implementation of functions, using multiple macros, or a combination with variables? Can you give an example?

_________________
----------------------------------------Syrifina---------------------------------------------------
PM me for licenses and/or licensing information: Click Here
[Be sure to include and update your profile with your BE ID]

Forum Rules
Reminder of rules regarding Contribution points
Getting started in 1, 2, 3
Virtual Drivers; Manual Installers


Top
 Profile  
Reply with quote  
 Post subject: Re: About Text Files.
Thanked: 0 time(s)  Unread post Posted: Tue Oct 17, 2017 7:11 pm 
VIP Contributor
VIP Contributor
User avatar



Joined: Fri Nov 01, 2013 10:45 pm
Posts: 841
Location: Egypt , Portsaid
Been thanked: 241 time(s)
Has thanked: 10 time(s)
Contribution Points: 1997
Syrifina wrote:
How would you use it that would be different from the current implementation of functions, using multiple macros, or a combination with variables? Can you give an example?

well i mean i have a Script that asks the User for ID and PW if they want to Activate the Relogin Script for DMO GAME and save these info in Text files in Drive C:\\ so i need to make in it
if they want to Activate a Function in The Main Attacking Script if they Confirmed with Yes Button then the Function will be Used if they didn't Confirm so the Script will be Disabled ...

_________________
--------------------------------------------------------------------------------
All Of My Scripts Can Be Found in Here !!!
viewtopic.php?f=304&p=190914
--------------------------------------------------------------------------------


Top
 Profile  
Reply with quote  
 Post subject: Re: About Text Files.
Thanked: 0 time(s)  Unread post Posted: Wed Oct 18, 2017 9:26 am 
Partner / License admin
Partner / License admin
User avatar



Joined: Sun Oct 10, 2010 5:16 pm
Posts: 1842
Location: USA
Been thanked: 393 time(s)
Has thanked: 33 time(s)
Contribution Points: 16383
You could do those without "importing" a function.

The second one is easier, so let's start with that. Use the windows instructions to script out your questions like,
Window.Request user single choice input("Do you want to relogin?.", "yes;no", "variableForResult")
Then script, if variable is equal to "yes"
begin
function.execute("login function") ... or Macro.Execute new("MacroCategory", "MacroName", "yes")
...of course, if it's "no" you don't have to script anything (unless you want it to do something else)

The login function/macro can be done the same way, but you'll need the ID/password. So, you can either have the text file already written, use the window instructions to have a user input ID/password and write to a text file, or just save them as variables (or global variables if using macro.execute new). If you saved as a text file, just have BEM read from the file; if variables, they can be easily called.

Here's an example:
Code:
 begin
     Window.Request user single choice input("Do you want to re-login?", "yes;no", "x")
     if  Variable.Is equal to("x", "yes")
          begin
               Function.Execute("login")
          end
     Window.Display message box("You choose - no", "yes")
 end

function("login")
     begin
          Window.Request user text input("Type your ID", "y")
          Window.Request user text input("Type your Password", "z")
          Macro.Pause("10")
          // write the steps to logout and get to login page here
          Variable.Evaluate (Text)("Your ID was {y} and your password was {z}", "a")
          Window.Display message box("{a}", "yes")
          Macro.Abort()
     end
function


Hope that helps.

_________________
----------------------------------------Syrifina---------------------------------------------------
PM me for licenses and/or licensing information: Click Here
[Be sure to include and update your profile with your BE ID]

Forum Rules
Reminder of rules regarding Contribution points
Getting started in 1, 2, 3
Virtual Drivers; Manual Installers


Top
 Profile  
Reply with quote  
 Post subject: Re: About Text Files.
Thanked: 0 time(s)  Unread post Posted: Wed Oct 18, 2017 4:17 pm 
VIP Contributor
VIP Contributor
User avatar



Joined: Fri Nov 01, 2013 10:45 pm
Posts: 841
Location: Egypt , Portsaid
Been thanked: 241 time(s)
Has thanked: 10 time(s)
Contribution Points: 1997
EDIT : well Never Mind i've Done it using
Code:
          Window.Request user multiple buttons choice("Do You Want To Activate Attribute Disposer ?!", "Yes;No", "AttributeChoice")

so the Answer Will be written in a file then let the Other script read the file and act as the Answer

_________________
--------------------------------------------------------------------------------
All Of My Scripts Can Be Found in Here !!!
viewtopic.php?f=304&p=190914
--------------------------------------------------------------------------------


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


You cannot post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group