Sign in to follow this  
Followers 0
Teckx

Would this work? GUI is it being typed or pasted?

3 posts in this topic

#1 ·  Posted

I am trying to automate some tasks at my work. Simple admin stuff.

One of my tasks involves active directory. So ive moved over to powershell to modify the desired attributes I need to change.

One problem I have noticed is when running powershell as Administrator autoit will not Send any data to it.

So I can find a  way around that im sure by authenticating through the non-admin side of powershell. My next issue is I cannot mouseclick paste into powershell so I would need to provide the variables to autoit to include in my predefined script. Example

 

Hello "John" Today is "Friday"

 

I wanted to create a GUI that would prompt me for USERNAME and the DAY

So when autoit interacts with poweshell it will have a predetermined script of Hello $variable1 Today is $variable2

When autoit is entering those variables would it be typed or pasted? I am rather new to autoit so creating the gui and everything will take me some time so if its going to be a complete bust then I will figure out another route.

 

Make sense?

Share this post


Link to post
Share on other sites



#2 ·  Posted

@Teckx as much as I use Powershell on a daily basis, I am a firm believer in not mixing languages when at all possible (although I will admit to powershell with AutoIt GUIs more often than I care to admit). For this, though, since you are working in A.D., have you looked at Water's wonderful Active Directory UDF in the Examples forum? You should be able to do everything you need to without invoking PS, which will simplify the whole script.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

#3 ·  Posted

@JLogan3o13 thanks for the info.  I had browsed his ad pack a few days ago and didn't see certain items. Just posted over there. Thanks for the help

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0