Jump to content

Recommended Posts

Posted

Good day,

So far, this code fragment is functioning as expected:

Local $_sSrcPDFPath = "D:\Install\App_Config\Digital_Audio\5_Sessions\Scripts\Procedure_Developer\Assets"
;------------------------------------------------
GUISetHelp('C:\Program Files (x86)\FoxitReader\Foxit Reader.exe "' & $_sSrcPDFPath & "\Session Producer User Guide.pdf")

However, how do I go about assigning a variable to "C:\Program Files (x86)\FoxitReader\Foxit Reader.exe" Anything that I have tried has failed!
• For example:

Local $_sSrcAppPath = "C:\Program Files (x86)\FoxitReader\Foxit Reader.exe"

Any assistance in this matter would be greatly appreciated!

Posted
38 minutes ago, mr-es335 said:
GUISetHelp('C:\Program Files (x86)\FoxitReader\Foxit Reader.exe "' & $_sSrcPDFPath & "\Session Producer User Guide.pdf")

GUISetHelp('C:\Program Files (x86)\FoxitReader\Foxit Reader.exe "' & $_sSrcPDFPath & "\Session Producer User Guide.pdf")

Look to manage the spaces ;)

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Posted

argumentum,

Firstly, thanks for the follow-up...appreciated!

Secondly, not really following you here!

IF spaces ARE an issue, then why does the 2nd half of the code work?

Adding the variable [$_sSrcAppPath] for the "C:\Program Files (x86)\FoxitReader\Foxit Reader.exe" is what I am having an issue with.

An example might be helpful here.

Posted

In all these situations, I use only double quotes (") and their corresponding character Chr(34), which leads to this working example on my computer :

GUICreate("F1 for help")

$sHelpFile = "C:\Program Files\Foxit Software\Foxit Reader\Foxit Reader.exe"
$sPdfFile = "D:\Internet Sources 2\AutoIt - scripts pour Windows (oui)\AutoIt_v3-_Your_Quick_Guide.pdf"
GUISetHelp($sHelpFile & " " & Chr(34) & $sPdfFile & Chr(34))

GUISetState()

Do
Until GUIGetMsg() = -3

 

"I think you are searching a bug where there is no bug... don't listen to bad advice."

Posted

pixerlsearch,

Thanks for the follow-up...appreciated!

I tried the following...which does not work for me. I receive no errors...no output from F1. All that I did was to update the source and destination paths.

GUICreate("F1 for help")

$sHelpFile = "C:\Program Files(x86)\FoxitReader\Foxit Reader.exe"
$sPdfFile = "E:\Desktop\Testing\help.pdf"
GUISetHelp($sHelpFile & " " & Chr(34) & $sPdfFile & Chr(34))

GUISetState()

Do
Until GUIGetMsg() = -3

 

Posted (edited)
GUICreate("F1 for help")

$sHelpFile = "C:\Program Files(x86)\FoxitReader\Foxit Reader.exe"
$sPdfFile = "E:\Desktop\Testing\help.pdf"
GUISetHelp('"' & $sHelpFile & '" "' &  $sPdfFile & '"')

GUISetState()

Do
Until GUIGetMsg() = -3

 

Local $_sSrcPDFPath = "D:\Install\App_Config\Digital_Audio\5_Sessions\Scripts\Procedure_Developer\Assets"
Local $_sSrcAppPath = "C:\Program Files (x86)\FoxitReader\Foxit Reader.exe"

GUISetHelp('"' & $_sSrcAppPath & '" "' & $_sSrcPDFPath & '\Session Producer User Guide.pdf"')


 

Edited by ioa747

I know that I know nothing

  • Solution
Posted
36 minutes ago, mr-es335 said:

I receive no errors...no output from F1.

This means that the content of the variable $sHelpFile is not correct on your computer and "FoxIt Reader.exe" cannot be found.

I can easily reproduce your error ["no output from F1"] if I alter voluntarily the content of the $sHelpFile variable, to point to a non-existing folder, then the exe won't be found and F1 won't react.

Are you sure the path indicated in your $sHelpFile is 100% correct, no space missing or anything else ? Could it be possible that your ...\FoxitReader\... should in fact be ...\Foxit Reader\... (with a space between Foxit and Reader), as on my computer (this is the default folder created by FoxIt when it installed the reader, many years ago)

If you're 100% sure of the content of your $sHelpFile variable, then I don't have another idea, especially the script I presented works fine on my computer.

Good luck

"I think you are searching a bug where there is no bug... don't listen to bad advice."

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...