very annoying behavior (at least for me)

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 6 years and 3 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
Domtar
Posts: 133
Last visit: Mon Mar 11, 2024 5:38 am
Has voted: 2 times

very annoying behavior (at least for me)

Post by Domtar »

To help you better we need some information from you.

*** Please fill in the fields below. If you leave fields empty or specify 'latest' rather than the actual version your answer will be delayed as we will be forced to ask you for this information. ***

Product, version and build: PowerShell Studio 5.4.145
32 or 64 bit version of product: 64 bit
Operating system: Win 10
32 or 64 bit OS: 64 bit

*** Please add details and screenshots as needed below. ***

DO NOT POST SUBSCRIPTIONS, KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM

hi support,

sorry for the long post, but I need to describe the process.

I have a template to install packages from SCCM. In this template, there are a few lines that need to be edited to add the stuff that need to run.

here's an example:

If the installation is a setup file that accepts parameters to run silently, usually I need to run "setup.exe /install /silent /norestart". Since we do this a lot, I created a function called runExeFile that I need to pass the EXE name and the params string. The line is;

runExeFile -exeFile "file_name_here" -params "params_here"

now, here's the annoying part: when I edit this line, whenever I change "file_name_here" for "$somevar....

as soon as I type the backslash in the string, PowerShell studio will replace double-quotes for single-quotes. I do not wish for that behavior, it is very annoying to have to go back and put the double-quotes back there. I looked into the options but saw no where to remove that darn feature.

thank you!
cody m

Re: very annoying behavior (at least for me)

Post by cody m »

I wasn't able to reproduce your bug, so that I can better replicate your circumstances, could you provide a screen shot of your PowerShell Studio settings?
User avatar
mxtrinidad
Posts: 399
Last visit: Tue May 16, 2023 6:52 am

Re: very annoying behavior (at least for me)

Post by mxtrinidad »

I neither was able to reproduce the behavior. The only thing you may want to try is, under "Options", to unchecked the "Auto-insert closing string quote".

So, while trying to find the behavior, create a little code snippet that may help using DOS cmd "netstat" as an example:

Code: Select all

function runExecFile
{
	param (
		$execfile,
		$params
	)
	## - Construct command string:
	$runCmd = "$execfile $params";
	Write-Host "Executing Command: $runCmd";
	Invoke-Expression  $runCmd
};

$execfile = "netstat.exe"
$params = "/a /b";

runExecFile -execfile $execfile -params $params
:)
User avatar
Domtar
Posts: 133
Last visit: Mon Mar 11, 2024 5:38 am
Has voted: 2 times

Re: very annoying behavior (at least for me)

Post by Domtar »

the issue is when you edit a string with quotes already existing.

take this line: $string = ""

add to it c:\ and i bet that you'll see the quotes are changed.
User avatar
Domtar
Posts: 133
Last visit: Mon Mar 11, 2024 5:38 am
Has voted: 2 times

Re: very annoying behavior (at least for me)

Post by Domtar »

mxtrinidad,

I copied / pasted your code in my PS Studio, and added c:\ to netstat.exe and the quotes changed.
User avatar
mxtrinidad
Posts: 399
Last visit: Tue May 16, 2023 6:52 am

Re: very annoying behavior (at least for me)

Post by mxtrinidad »

We starting to spot the behavior. But, it would help if you can provide a screen shot before and after.
This way we can narrow down what's going on.

Thanks!
User avatar
Domtar
Posts: 133
Last visit: Mon Mar 11, 2024 5:38 am
Has voted: 2 times

Re: very annoying behavior (at least for me)

Post by Domtar »

as requested!
Attachments
quotes.png
quotes.png (21.47 KiB) Viewed 5015 times
User avatar
mxtrinidad
Posts: 399
Last visit: Tue May 16, 2023 6:52 am

Re: very annoying behavior (at least for me)

Post by mxtrinidad »

Hum! I still can't reproduce the behavior. Please send me the print screen of the Options setting of 3 areas:
1. Editor
2. Editor -> Formatting
3. And,Editor -> PrimalSense

Make sure to capture all options shown. I think we could trap the issue in the Options settings.
:)
User avatar
Domtar
Posts: 133
Last visit: Mon Mar 11, 2024 5:38 am
Has voted: 2 times

Re: very annoying behavior (at least for me)

Post by Domtar »

thanks mate!
Attachments
primalsense.png
primalsense.png (27.74 KiB) Viewed 5001 times
formatting.png
formatting.png (32.98 KiB) Viewed 5001 times
editor.png
editor.png (32.02 KiB) Viewed 5001 times
User avatar
mxtrinidad
Posts: 399
Last visit: Tue May 16, 2023 6:52 am

Re: very annoying behavior (at least for me)

Post by mxtrinidad »

Ok! So I still puzzle about this issue. But, from two different Windows 10 build seems to works fine.

Sorry to ask for more here! But can you send me the print screen showing only the version #. I need visual confirmation as I need to make sure I got the right version to support you.

Thanks again!
PSVer_2017-11-23_10-29-17.png
PSVer_2017-11-23_10-29-17.png (50.96 KiB) Viewed 4994 times
This topic is 6 years and 3 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.