Jump to content

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


Recommended Posts

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?

Link to comment
Share on other sites

  • Moderators

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

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...