Jump to content

Recommended Posts

Posted

hey guys,

i'm not much of a coder so please bear with me if this seems a little low brow

what i am having a problem with is introducing a variable into a shellexecute command that works;

ShellExecute("C:\Users\frank\Documents\SFiles\C\New York Mets.sfcht")

above works fine, file opens and then i am able to manipulate with autoit

but when i attempt to get the 'New York Mets' from the clipboard

$Name1=ClipGet()
ShellExecute("C:\Users\frank\Documents\SFiles\C\" & $Name1 & ".sfcht")

 i get an error message

Windows cannot find 'C:\Users\frank\Documents\SFiles\C\New York Mets.sfcht'. Make sure........

i have been through the forums and the help files but no luck so far

any help most appreciated

 

christinaA

 

  • Developers
Posted

Doubt the text is exactly the same on the clipboard. Have you checked there are no extra spaces or a Tab char maybe?
Just write the text you retrieve from the clipboard to a file for checking.

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

  • Developers
Posted (edited)
  On 10/20/2015 at 6:51 PM, christina_applegate said:

hi philkryder,

i tried your code but had to add $ in front of Name1 as in:

msgbox(0,"",">" & $Name1 & "<")

and the return was:

>New York Mets

<

christinaA

This seems to indicate that there is a CR / LF or CRLF added to the end of the text.
Try stripping those.

Jos

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...