Modify

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#1743 closed Bug (No Bug)

fileexists

Reported by: anonymous Owned by:
Milestone: Component: AutoIt
Version: 3.3.6.1 Severity: None
Keywords: Cc:

Description

I'm getting different results from the below two examples

;displays msgbox
$craw="C:\Program Files\Internet Explorer\iexplore.exe"
if fileexists($craw) then msgbox(0,$craw,"",0)


;does not display msgbox
$craw=$CmdLineRaw
if fileexists($craw) then msgbox(0,$craw,"",0)

;$cmdlineraw would be populated with
;"C:\Program Files\Internet Explorer\iexplore.exe"
;when executed with same command line parameter.

;C:\Program Files\Internet Explorer\iexplore.exe)

Attachments (0)

Change History (4)

comment:1 in reply to: ↑ description ; follow-up: Changed 14 years ago by anonymous

Clarification; this was produced from putting a shortcut into sendto folder where
one could then right click and send .exe to the autoit exe
In this scenario if the cmdline parameter does not have any spaces in the path
it works. i.e. instead of C:\Program Files\Internet Explorer\iexplore.exe
d:\programs\abc.exe was used instead.

oddly enough if I typed the command with path (with spaces and without) in the CMD prompt it works as intended.

It seem like an issue with how sendto supplies the path.

Replying to anonymous:

I'm getting different results from the below two examples

;displays msgbox
$craw="C:\Program Files\Internet Explorer\iexplore.exe"
if fileexists($craw) then msgbox(0,$craw,"",0)


;does not display msgbox
$craw=$CmdLineRaw
if fileexists($craw) then msgbox(0,$craw,"",0)

;$cmdlineraw would be populated with
;"C:\Program Files\Internet Explorer\iexplore.exe"
;when executed with same command line parameter.

;C:\Program Files\Internet Explorer\iexplore.exe)

comment:2 in reply to: ↑ 1 Changed 14 years ago by anonymous

Ok, apologies; this may not be a bug afterall
sendto is supplying the commandline path with quotes
"C:\Program Files\Internet Explorer\iexplore.exe"
and fileexists does not appear to handle it properly when quoted.

zzz "C:\Program Files\Internet Explorer\iexplore.exe" (fails)
zzz C:\Program Files\Internet Explorer\iexplore.exe (works)

Replying to anonymous:

Clarification; this was produced from putting a shortcut into sendto folder where
one could then right click and send .exe to the autoit exe
In this scenario if the cmdline parameter does not have any spaces in the path
it works. i.e. instead of C:\Program Files\Internet Explorer\iexplore.exe
d:\programs\abc.exe was used instead.

oddly enough if I typed the command with path (with spaces and without) in the CMD prompt it works as intended.

It seem like an issue with how sendto supplies the path.

Replying to anonymous:

I'm getting different results from the below two examples

;displays msgbox
$craw="C:\Program Files\Internet Explorer\iexplore.exe"
if fileexists($craw) then msgbox(0,$craw,"",0)


;does not display msgbox
$craw=$CmdLineRaw
if fileexists($craw) then msgbox(0,$craw,"",0)

;$cmdlineraw would be populated with
;"C:\Program Files\Internet Explorer\iexplore.exe"
;when executed with same command line parameter.

;C:\Program Files\Internet Explorer\iexplore.exe)

comment:3 Changed 14 years ago by Jpm

  • Resolution set to No Bug
  • Status changed from new to closed

comment:4 Changed 14 years ago by Jpm

Next time go to forum first to get hints ...

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The ticket will remain with no owner.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.