mr-es335 Posted August 19, 2024 Posted August 19, 2024 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! mr-es335 Sentinel Music Studios
argumentum Posted August 19, 2024 Posted August 19, 2024 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.
mr-es335 Posted August 19, 2024 Author Posted August 19, 2024 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. mr-es335 Sentinel Music Studios
argumentum Posted August 19, 2024 Posted August 19, 2024 I don't have your setup so I don't know. I tested the example from the help file and it works. All I see in your code is lack of encapsulation for your string. Like $Run = '"C:\Program Files (x86)\FoxitReader\Foxit Reader.exe" "my other string"' Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
argumentum Posted August 19, 2024 Posted August 19, 2024 you may have to add -url before the url for that browser. No clue. But it should be simple. Just ConsoleWrite() the full string to see how it looks. If it works from cmd.exe it should work in the script. Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
pixelsearch Posted August 19, 2024 Posted August 19, 2024 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."
mr-es335 Posted August 19, 2024 Author Posted August 19, 2024 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 mr-es335 Sentinel Music Studios
ioa747 Posted August 19, 2024 Posted August 19, 2024 (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 August 19, 2024 by ioa747 I know that I know nothing
Solution pixelsearch Posted August 19, 2024 Solution Posted August 19, 2024 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."
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now