Sign in to follow this  
Followers 0
simhabitton

Question about if function with copy/paste

2 posts in this topic

* I also wrote it in General Help and Support forum - if it's not allowed, please delete one of them :)

im pretty new to AutoIt and i have a question,

 

How can i do that the code will check if the clipboard is empty or with content

for example,

i built a program that has 10 buttons, each button relate to a text box that contain url addresses (of sports websites)

 

each button copy to clipboard the url that inside the textbox (1,2,3 etc)

 

some of them are empty sometimes (i edit them for testing or for updates)

Then it paste it to Url box address inside the software and press "Go".

 

the problem is, if it copied an empty textbox the program will give it an error and autoit wont continue

 

the is a solution that autoit will check if the clipboard is empty or with content?

 

something like:

If $clipboard <> "0" Then
MouseClick("Left",72,269) ;Continue to the next address
ElseIf $clipboard <> "1" Then
Send("{CTRLDOWN}v{CTRLUP}")
EndIf

I tried many ways but no success so far

There is anything like that?

 

Any solution would be welcome! 

Thanks!

Share this post


Link to post
Share on other sites



Welcome to AutoIt and the forum!

You are correct, crossposting isn't allowed.

A link to the forum rules can be found in the bottom right corner of each page.

A >FAQ is pinned as the first post of each thread.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

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