You have to login in order to post a reply to this topic.

12 replies [Last post]
peter-
peter-'s picture
User offline. Last seen 18 hours 50 min ago. Offline
Joined: 11/20/2009
Posts: 54

Like adding subtracting and dividing
sutracting is my problem right now

__________________

ourarticles

__________________

ourarticles

D.M.Altizer
User offline. Last seen 1 year 11 weeks ago. Offline
Joined: 01/12/2010
Posts: 204
Re: How do we perform simple maths functions

 Assuming that you have 2 variables e.g. %Number1% and %Number2%, you can subtract them using the notation:

%Number1-Number2%

divide them like this: %Number1/Number2% etc.

__________________

==Dedicated Automation Solutions==

__________________

==Dedicated Automation Solutions==

peter-
peter-'s picture
User offline. Last seen 18 hours 50 min ago. Offline
Joined: 11/20/2009
Posts: 54
Re: How do we perform simple maths functions

Thank you so simple why did I not think of that works a treat

__________________

ourarticles

__________________

ourarticles

gronk33
User offline. Last seen 1 year 11 weeks ago. Offline
Joined: 11/18/2010
Posts: 1
Re: How do we perform simple maths functions

I found this post and was really happy because now I can divide! However even when I enter a simple equation such as ths %4/2% I get this error:

 

"Attempted to divide by zero."

 

Is division actually possible?

Jkan
Jkan's picture
User offline. Last seen 22 hours 16 min ago. Offline
Joined: 11/07/2010
Posts: 57
Re: How do we perform simple maths functions

division is not working for me.

if you need really simple division maybe you can do it substracting with a loop.. but this will be time consuming.

 

JosephB
User offline. Last seen 1 hour 15 min ago. Offline
Joined: 11/13/2009
Posts: 110
Re: How do we perform simple maths functions

Jkan, gronk33
 

I am still using V 3.0 and have quite a bit of division in my jobs and it works fine in my jobs.

 

.... Are you usiing the new Ver 3.1 ?

 

I was just about to upgrade to the New 3.1 Version, Today, but will hold off, if division does not work in V3.1.

 

 

...... BTW, Are you placing one space before and after the division symbol  "/"  ???

(I always do, so no chance of syntax confusion)

 

so I use:      %4 / 2%

 

Jkan
Jkan's picture
User offline. Last seen 22 hours 16 min ago. Offline
Joined: 11/07/2010
Posts: 57
Re: How do we perform simple maths functions

im using 3.1

i dont know with 3.0, i upgraded last week.

the space trick does not work for me.

JosephB
User offline. Last seen 1 hour 15 min ago. Offline
Joined: 11/13/2009
Posts: 110
Re: How do we perform simple maths functions

Jkan,

 

I would like to suggest that you officially report this as a V3.1  -   "Bug ,"via either the Support email address or support page, as I know that divison works under V3.0 which I am currently still on.

 

.... Looks like I will have to wait for a "Division - Fix" Update Release, before I proceed with my upgrade  to V3.1 (since my jobs use Division math operations.)

Jkan
Jkan's picture
User offline. Last seen 22 hours 16 min ago. Offline
Joined: 11/07/2010
Posts: 57
Re: How do we perform simple maths functions

reported... and they fixed it really fast.

Samantha
Samantha's picture
User offline. Last seen 1 hour 23 min ago. Offline
Joined: 04/23/2010
Posts: 1353
Re: How do we perform simple maths functions

Bug's been fixed :)

You can download the newest version (3.1.2.602) where this prob no longer occurs.

:)
Samantha

__________________

Rome wasn't built in a day..

__________________

Rome wasn't built in a day..

JosephB
User offline. Last seen 1 hour 15 min ago. Offline
Joined: 11/13/2009
Posts: 110
Re: How do we perform simple maths functions

Samantha,
 

That was Quickly fixed !!!  I will proceed to upgrade now.

 

 

P.S.

How soon, in future, will changelog/history be posted on the download page for version listed there for download ?

Samantha
Samantha's picture
User offline. Last seen 1 hour 23 min ago. Offline
Joined: 04/23/2010
Posts: 1353
Re: How do we perform simple maths functions

Hello Joseph,

I would not know about it being published online, however you can find the changes within the help file in What's New.

To make things a bit easier in the mean time, I will also paste them below:

;)
Samantha

______________________________________________________________

Navigation: WinAutomation > What's New?

Version 3.1.2

Corrected: A syntax error with the message "Division by zero" occurred in expressions that included a division, regardless of the value of the operands.

Version 3.1.1

Corrected: When a copy/paste operation was followed by an undo/redo sequence in some cases an extra action would be added in the Job.

Corrected: The text value returned by the "Download from Web" action is now stripped from all non-printable characters.

Corrected: In certain cases a "Cannot Unload Domain" exception would occur when stopping a running Job.

Modified: The Numeric data type now holds larger values with more precision.

Version 3.1.0

Added: Support for add-ons - external action packs.

Added: The "Write Text to File" action has an additional property for specifying the encoding used for the text to be written into the file.

Added: The "Download from Web" action has a new "Encoding" property for specifying the encoding used for the web page. If the value is set to "Auto-detect" the action uses the encoding specified by the web server.

Added: The "Download from Web" action has a default value for the "User Agent" property.

Added: In Job Designer, a "Start from Here" menu item has been added in the Context Menu (right click menu) allowing the user to start the execution of a job from a specific action.

Added: Toolbar buttons and menu items in Job Designer are now disabled when a job is executing through the Debugger.

Added: While debugging the "Execute Next Action" button can be pressed with a hotkey. The designated hotkey can be specified in the Job Designer Options dialog.

Added: While debugging the Job scrolls automatically so that the currently executing action is always visible.

Modified: The File Monitor Trigger variable %FileTriggerFilePath% now contains a file object instead of text making easier to retrieve info regarding the file that triggered the Job.

Modified: The Dialog box displayed by the "Display Select From List Dialog" action is now resizable to facilitate the selection of long list items.

Corrected: The "Send Mouse Click" action presses the correct mouse button when the functions of the left and right mouse buttons have been swapped.

Modified: The "Get Special Folder" action now contains a label that displays the path for the selected special folder.

Added: In the "Action Properties" dialog the F1 key is now used for opening the help topic for the specific action.

Added: The "Wait for Window" action can now wait for a window to get the focus (to become the foreground window) or lose the focus.

Added: The "If Window" action can now determine whether a specific window is focused (is the foreground window) or not.

Added: The "If Service" action can now determine whether a specific service is installed on the computer or not.

Added: New Action: "Get Foreground Window" action retrieves the title and handle of the Window that has the focus.

Added: New Action: "Generate Random Number" action, to get a random number or a list of random numbers.

Added: New Action: "Shuffle List" action, to randomly permute the items of a list.

Added: In the "Parse Text" action there is now an option to perform case-insensitive matching

Corrected: In certain cases, some actions issued a "Reference not set to an instance of an object" error when run through the debugger.

Modified: If a Job runs for more than 24 hours, now the Notification dialog also displays the total days in the running time field.

Added: New Action: "Get Mouse Position" action, to retrieve the position of the mouse cursor on the screen.

Added: The actions "Move Mouse" and "Send Mouse Click" now accept variables for mouse coordinates and the new mouse position can be relative to the current mouse position.

Added: New Action: "Terminate Process" action, to immediately stop a running process.

Added: New Action: "Ping" action, for sending a ping message to a remote computer.

Added: The "Sort List" action can now sort a list of objects, through specific properties

Corrected: When an IP address was entered in an action's property, depending on the regional settings of the computer, sometimes it was mistakenly interpreted as a number.

Added: New Action: "Synchronize FTP Directory" action, to synchronize the contents of a local and remote directory.

Added: The "Move Mouse to Image" action has now an option to wait if the image is not initially found as well as an option to send a click after the cursor is moved over the image.

Added: New Action: "If Image" action, to check whether an image exists or not on the screen.

Added: The "If" action now includes the following operators: "Starts with", "Does not start with", "Contains", "Does not contain", "Ends with", "Does not end with" and "Is Empty". All these new operators (except the last one) work both in case-sensitive and case-insensitive mode.

Added: The Job Designer can now save the Job automatically upon running the Job through the debugger. This option can be specified through the Job Designer Options Dialog.

Corrected: In some cases the Console didn't close successfully, leaving a ghost process running.

Added: New Action: "Remove Duplicate Items from List" action, to remove multiple occurrences of the same item in a list.

Added: New Action: "Empty Folder" action, to delete the contents of a folder without deleting the folder itself.

Modified: The "Get Job's Path" action now retrieves the path (folder plus job name) of non-compiled jobs too.

Modified: The "Download from Web" action can download a file and keep its original name as specified by the web server. When this option is selected, only the destination folder needs to be provided, instead of the full local path.

Added: In the "Replace Text" action there is now an option to perform case-insensitive matching

Modified: The "Replace With" property of the "Replace Text" action now accepts multi-line values.

Added: The "Convert Text to DateTime" action has now an option for converting dates that are represented in a non-standard format.

Corrected: The "Write Text to File" action crashed the designer when an extremely long text was entered as the value to be written into the file.

Added: The "Clear Logs" dialog allows you to archive the events into a different file before deleting them.

Corrected: In Windows Vista/7 for the event log to be cleared the Console should run with elevated privileged (as administrator).

Added: In the "Run DOS Command" action a new output property has been added for retrieving any error messages issued by the command or the console application.

Added: In the "End Job" action a new property has been added for specifying the Exit Code for Jobs that are compiled.

Modified: In the "Exception Handling" tab of an action's properties dialog, exceptions that are handled (have some behavior assigned) are displayed in bold.

Corrected: When two or more Job designers were open simultaneously the same Undo history was shared between the different designers.

Added: Support for persistent variables that keep their value between subsequent executions of the same Job. For compiled Jobs, persistent variables are stored into a satellite file and can be encrypted.

Added: A Welcome window is displayed when launching the WinAutomation console, that contains video tutorials and educational material.

Added: In the Options window there is an additional option that sets the application to remember the size and layout of the Console and Job Designer windows.

Corrected: In the "Rename Files" action, when renaming a file and specifying as a new name the name it already had, and the "Overwrite" selection was chosen, the file was deleted.

Modified: In the "Run Job" action the list of Jobs to choose from, now appears sorted.

Version 3.0.3

Corrected: When deleting an action sometimes the window didn't refresh properly.

Corrected: An error occurred in the "Run Job" action if the Job had already launched an Excel instance

Corrected: The "Unzip files" action would not unzip files that their names started or ended with a dot (.)

Corrected: In rare cases the Notification Window was displayed below other windows. In other cases it could steal the keyboard focus from the foreground window.

Corrected: The "Find Common List Items" action returned the first list instead of the intersection of the two provided lists

Corrected: The "Capture" function in the "Move Mouse to Image" and "Wait for Image" actions produced an error if an empty region was selected

Added: A message box is displayed to inform the user after an attempt to export a Job that contains illegal characters in its name.

Corrected: The "Rename File(s)" action in the Designer did not display correctly the "Add DateTime before/after" property value in the designer.

Version 3.0.2

Corrected: Jobs performance deteriorated when variables contained large amount of data.

Corrected: SendKeys action failed to send correctly the characters ~, %, ^, (, ), +, [ and ].

Corrected: Exception occurred in very large jobs (more than 3000 actions).

Corrected: In some cases, a job would stop when the user pressed Enter because the "Stop Job" in the notification window had the focus by default.

Version 3.0.1

Corrected: Schedule Trigger's "Monthly" option is now working as intended.

Corrected: Subtract Lists action bug corrected.

Added: Minimum Delay Between Keystrokes (Send Keys action) is now 0

Corrected: A known issue with "Send Keys" action where in rare cases duplicate keystrokes were sent.

Added: Send Keys now works in remote desktop

Added: Send Keys now works in Console Window

Added: Multiple repetitive keystrokes can be sent in the format {X:n}

Corrected: "Delete FTP Directory" action now deletes directories even when they are not empty (recursively)

Corrected: A normal exception thrown by the "Unzip Files" action could result in an unhandled exception

Corrected: When "Display Big Icons" setting was selected in Job Designer the icons failed to display properly.

Corrected: "Open FTP Connection" could fail if the agent was launched before the service. It has now been fixed.

Version 3.0.0

Service

· WinAutomation's service is now more lightweight and more stable.

· All errors with 64bit versions of windows have been fixed.

· You can now stop WinAutomation's service by right clicking on the tray icon of the Agent and selecting: "Exit WinAutomation"

· WinAutomation's service has been redesigned, to require less system resources.

· There is no longer an option to start and stop the service through the console. Opening the console will automatically start the service and you cannot stop the service through the tray icon if the console is open.

Console

· The general options have been enriched; check "Tools - Options" in the console window to test the new options. Specifically:

· There is now an option to stop all jobs that are currently running with a HotKey (General tab)

· There is an option that allows you to control if WinAutomation's service will start when the machine boots (Service tab)

· You can now disable the system tray icon (Notifications tab)

· The "balloon" that used to notify the user whenever a job started or ended has been replaced by a special Notification Popup Window that you can show or hide (Notifications tab)

· You can globally decide which file types will be treated as ASCII files by the FTP actions (FTP tab)

· There are some "Global Error Handling" options that you can set in the case that your jobs fail to complete such as Write the Event to a log file or Send Email (Error Handling tab). In the case that you decide to send an email, you will have to set the SMTP options (SMTP Server tab)

· There is a new logging system; check "Tools - View Logs" to see the changes. You can filter the log events based on date, type of event or source of event. There is also a new pane in the console that shows the most recent Log Records.

· You can now open multiple jobs and still be able to interact with the console

· You can view the logs for a specific job (Right click on the job and select "View Logs for the specific job" option)

· The jobs are now saved in a database that you can backup, restore and compact ("Tools - Manage Jobs Database")

· The jobs are now exported to a new file type (*.waj), however, there is backward compatibility (you can import old xml files but you can't open waj files with WinAutomation 2)

· You can import multiple jobs at once

· There is a special executable in WinAutomation's installation directory (WinAutomationController.exe) that allows you to run and stop your jobs through the command line.

Job Designer

· All actions have been redesigned and in their property dialogs the main tab is now divided in 2 sections: "Action Input" and "Action Output".

· A new special "gear" icon has been introduced, that allows you to select from variables that have been created/used earlier in the job. This icon can be used only in fields that reside in the "Action Input" section of the action's properties window.

· There are a lot of internal features like automatic variable handling (automatically create a new variable when it's declared and delete when it's not used) and the addition of new types of variables (files, folders etc) that intend to make interaction with variables much easier. For example, you do not need to use the "Define New Variable" option now: you just place a variable name in the field and if it does not exist, it is automatically created.

· There are no longer yellow and white background colors in forms: whenever you want to use a variable, you will have to enclose it in percentages (e.g %MyVar%).

· The image recognition system has been significantly changed: it is now more accurate and stable, and the tolerance option is now more versatile (in version 3, it does not only understand differences in color tones but it also indicates the amount of different pixels that is allowed).

New Actions

· Download From Web (Web category): This action acts like a browser and can handle http requests, supporting both, get and post method for posting data.

· Get Command Line Arguments (WinAutomation actions category): This action retrieves the command line arguments that can be provided through the command line or if the job is compiled.

· Get Job's Path (WinAutomation actions category): This action retrieves the path to the executable (obviously works only if the job is compiled)

· Wait For Mouse (Wait category): You can now use this action for specific type of applications where the only indicator that you have for a complete task is the mouse icon

· Press/Release Key (Mouse and Keyboard category): Presses (and holds) or releases a moifier key. This new action allows you to combine any of the known modifiers (Control, Alt, Shift) with a mouse move/click.

· Set Key State (Mouse and Keyboard category): You can use this key to ensure that Caps Lock, Scroll Lock and Num Lock are on the state that you want them to be during the execution of a specific job.

· Display Notification (Message Boxes category): This action can be used to print useful information about the job execution in the Notification window that pops up whenever you run the job through the console (unless you have specified that this window does not appear). Also, it will print the information that you specify in the console window that will appear if you compile your job as a "Console Application".

· Display Select Date dialog (Message Boxes category): Allows you to prompt the user to select a date or a date range.

· Get Special Folder (Folders category): This action will return the path of special Windows folders (e.g Desktop). It can prove really useful if you want to create a job that does not depend on the user's Windows version (XP/Vista).

· Open Secure FTP Connection (FTP category): Allows you to open a secure FTP connection (sFTP or FTPs, implicit or explicit)

· Download Folder(s) (FTP category): Allows the download of a folder and its contents through FTP

· Upload Folder(s) (FTP category): Allows the upload of a folder and its contents through FTP

· Invoke FTP Command (FTP category): Allows you to send a custom FTP command to an FTP server

· Change Text Case (Text Actions category): Allows you to change the case of a specific text (possible options to convert to: lowercase, UPPERCASE, Sentence case, Title Case)

Changed Actions

· Run Job action (WinAutomation actions category): There is now an option to "Wait for job to complete". The job that is called through this action, can now use the variables that are declared in the main job.

· Display Input Dialog (Message Boxes category): This action can now prompt the user for a password, and accept multiple lines as input.

· Display Select from List Dialog (Message Boxes category): You can now allow the user to select multiple items and disallow the empty selection.

· Get Files in Folder (Files category): Allows you to sort the files that you retrieve based on specific attributes (e.g Size, Last Modified etc)

· Get SubFolders in Folder (Folders category): Allows you to sort the folders that you retrieve based on specific attributes (e.g Creation Time, Last Modified etc)

· Download File(s) from FTP (FTP category): Allows you to select "Auto" as a transfer type.

· Upload File(s) to FTP (FTP category): Allows you to select "Auto" as a transfer type.

· Open FTP Connection (FTP category): You can now use use a variable as password

Compile Job to Exe

· There are new options to choose from when you are generating an executable: you can specify how the exe will deal with a possible exception (e.g Return error code = 1) or if you want to compile the job as a windows or a console application.

__________________

Rome wasn't built in a day..

__________________

Rome wasn't built in a day..

JosephB
User offline. Last seen 1 hour 15 min ago. Offline
Joined: 11/13/2009
Posts: 110
Re: How do we perform simple maths functions

Samantha,
 
Thanks, for info !