[solved] Load variable

Ask questions about creating Graphical User Interfaces (GUI) in PowerShell and using WinForms controls.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Locked
klarlichter
Posts: 40
Meble kuchenne na zamówienie - na wymiar - Wrocław
Joined: Tue Nov 19, 2019 1:17 am

[solved] Load variable

Post by klarlichter »

Hello,

I create inside a poweshell studio project the file

configuration.ps1

There i wrote
$user1 = "Test"

on another powershell script or form i use
Param ($user1)

Why i cant get that value $user1 from configuration.ps1 ?

I think he missing that source script that he understand where $user1 setup but how to do it?

It seems that i cant get a variable inside a form from a ps1 script?
Last edited by klarlichter on Thu Nov 28, 2019 11:29 am, edited 1 time in total.

jvierra
Posts: 14444
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: Load variable

Post by jvierra »


klarlichter
Posts: 40
Joined: Tue Nov 19, 2019 1:17 am

Re: Load variable

Post by klarlichter »

Hi,
i place it inside "Globals.ps1" and it load inside every script.

Locked