Jump to content

ludoo

Members
  • Posts

    19
  • Joined

  • Last visited

Everything posted by ludoo

  1. adding an include AD, how to have recognition of the functions of the include, is there also a module "Run User Call Tip Manager"
  2. yes un snippet manager , Google traduction pas terrible .
  3. Thank you for this great IDE, here is what missed autoit a real IDE for the next version, the addition of the snippet to search our favorite bits of code, as in software sapien studio.
  4. hi , Here are the features that I use: the first function to create the user : newuser Func newuser($nom,$prenom) ; mise en format prénom et nom pour le traitement $nom = StringReplace($nUser," ","");supprime espace vide $long = StringLen($nom) If $long > 16 Then $nom = StringMid($nom,1,16);16 caracteres maxi $nom = StringUpper($nom) $prenom = StringReplace($pUser," ","");supprime espace vide $prenom = StringMid($prenom,1,2);2 caracteres $prenom = StringUpper($prenom) Global $spUser = StringLeft($pUser, 2) ; récupere les 2 premiere lettre du prénom Global $spUserPr = StringLeft($pUser, 1) ;récupere la premiere lettre du prénom Global $spUserL = StringLower($pUser) ; pour mettre le prénom en minuscule Global $snUserL = StringLower($nom) ; pour mettre le nom en minuscule Global $snUserU = StringUpper($nUser) ; pour mettre le nom en majuscule ;~ Global $spUserU = StringUpper($spUser) ; pour mettre le prénom en majuscule Global $spUserUPr = StringUpper($spUserPr) ; pour mettre la premiere lette du prénom en majuscule Global $sStringpUsers = StringTrimLeft($pUser, 1) ; pour enlever la premiere lettre du prénom à partir de la gauche Global $sStringpUsersL = StringLower($sStringpUsers) ; mettre le prénom en minuscule sans la premiere lettre Global $sAMAccountNameUser = $nom&$prenom ; association du nom en majuscule + les 2 premiere lettre du prénom en majuscule Global $suserPrincipalName = $spUserL&"."&$snUserL&$suffixeUPN ; association du prenom en minuscule + le nom en minuscule + suffixe UPN Global $cnUser = $snUserU&' '&$spUserUPr&$sStringpUsersL ; association du nom en majuscule + premiere lettre prenom en majuscule + reste du prénom en minuscule Global $email = $spUserL&"."&$snUserL&$suffixemail Global $nomuser = $nom getalluser() EndFunc ; => newuser the second feature to look for another user with the same name : getalluser Func getalluser() _AD_Open() ConsoleWrite($sAMAccountNameUser &@CRLF) ; compte d'ouverture de session 2000 Sleep(5000) ;~ Global $getalluser = $sAMAccountNameUser Global $getalluser = $nomuser ConsoleWrite($getalluser &@CRLF) Sleep(5000) Global $TargetOUuser = "OU=xx,OU=xx,OU=xx,OU=xx,DC=xx,DC=xx" Global $aObjects[1][1] $aObjects = _AD_GetObjectsInOU($TargetOUuser, "(&(objectcategory=person)(objectclass=user)(cn=" & $getalluser & "*))", 2, "sAMAccountName") If @error > 0 Then MsgBox(64, "Active Directory Functions - Example 2", "No OUs could be found") Else _ArrayDisplay($aObjects, "Active Directory Functions - Example 2 - Objects in OU '" & $TargetOUuser & "'") EndIf EndFunc the third function for a single user : userunic() Func userunic() If _AD_ObjectExists($nom & $prenom) Then Local $array[6] = [$sAMAccountNameUser,$nomUnic1,$nomUnic2,$nomUnic3,$nomUnic4,$nomUnic5,$nomUnic6] For $i = 65 To 90 ;ASCII Character A à Z Local $array[2] = [$sAMAccountNameUser,Chr($i)] _ArraySearch($array,$sAMAccountNameUser & Chr($i)) _ArraySearch($array,$nom & $prenom & Chr($i)) If @error Then $nomUnic_1 = $nom & $prenom $ Chr($i) Global $suserPrincipalName = $spUserL&"."&$snUserL&"."&Chr($i)&$suffixeUPN Global $cnUser = $snUserU&' '&$spUserUPr&$sStringpUsersL&Chr($i) Global $email = $spUserL&"."&$snUserL&"."&Chr($i)&$suffixemail ExitLoop EndIf Next ConsoleWrite($nomUnic1 & @CR) ConsoleWrite($suserPrincipalName & @CR) ConsoleWrite($cnUser & @CR) Return $nomUnic_1 Else $sAMAccountNameUser = $sAMAccountNameUser EndIf EndFunc ;=> userunic how to put the result the second feature in the array the third function
  5. ok , thank for the function , the result is a array , we can use the _ArraySearch where $array [?] = how to know the number of return
  6. Hi, is it possible to use the _AD_ObjectExists function to find a user with only the beginning of the name or other, and to have the results in a array ex : search user , "Marley bob" ou "Marley Paul" , with only "marley" and have the result in a array. thank you for your help
  7. yes , I use the date format europe (France), it is converted into the US date format? or it comes from Active Directory, in all it's not easy
  8. hi, thank you for this great UDF on the Active Directory management is attempting to use the _AD_SetAccountExpire function, it's a shame we can not use the variable: GUICtrlCreateDate thank you for your help.
  9. HI, When I run a script , this error i. thank you for your help. AutoIt Version: V3.3.8.1 [X64] Windows Version: WIN_7 [X64] Language: French (040C)
  10. ok, thank you, I corrected the script to get the same result #Include <_XMLDomWrapper.au3> $path = @ScriptDir&"test.xml" $root = "FileZillaServer" _XMLCreateFile ($path, $root, True); create file with root data $hXml= _XMLFileOpen($path) _XMLCreateRootChild("Users", "" , "") Dim $user = "ludo-rds" Dim $Keys[1] Dim $Values[1] $Keys[0] = "Name" $Values[0] = $user _XMLCreateChildWAttr("//Users", "User", $Keys, $Values) $Keys[0] = "Name" $Values[0] = "Pass" ;******************************* _XMLCreateChildNode("//User", "Option", " ", "") ;~ _XMLCreateChildNode("//User", "Option", " ", "") _XMLSetAttrib($root&"/Users/User/Option[1]","Name", "Pass") ;********************************* ;*************************************** _XMLCreateChildNode("//User", "Option", " ", "") _XMLSetAttrib($root&"/Users/User/Option[2]","Name", "Group") ;************************************* _XMLUpdateField("//Option[1]", "") _XMLUpdateField("//Option[2]", "")
  11. ok , the problem is that the XML file is empty for users. chager to summarize a model with a user creates XML and then modofier. thank you for this new track.
  12. Hi, Here is a problem, I would like to reproduce the xml file filezilla server here's a start code #Include <_XMLDomWrapper.au3> $path = @ScriptDir&amp;"test.xml" $root = "FileZillaServer" _XMLCreateFile ($path, $root, True); create file with root data $hXml= _XMLFileOpen($path) _XMLCreateRootChild("Users", "" , "") Dim $user = "ludo-rds" Dim $Keys[1] Dim $Values[1] $Keys[0] = "Name" $Values[0] = $user _XMLCreateChildWAttr("//Users", "User", $Keys, $Values) $Keys[0] = "Name" $Values[0] = "Pass" _XMLCreateChildNode("//User", "Option", " ", "") _XMLSetAttrib($root&amp;"/Users/User/Option","Name", "Pass") _XMLCreateChildNode("//User", "Option", " ", "") _XMLSetAttrib($root&amp;"/Users/User/Option","Name", "Group") resultat de mon XML: xml file and a copy thank you for your help
  13. to help me
  14. hi, What can be done to send commands to filezilla server. ex: creation of user account, directory beginning of a track. Here is a linkhttp://forum.filezilla-project.org/viewtopic.php?f=6&t=5310 that talks about how to transform the sript vbs script in autoit
  15. it works correctly with version 1.3.0.0, surely a problem connecting with AD
  16. ok , after changing the code, I get the same error message. I use autoit Version 3.3.8.1 ok, this is good , , more error
  17. version 3.3.8.1
  18. Hi, thank you for sharing this great UDF after an update from version 1.2.0 to 1.3.0.0 I use the function _AD_ObjectExists in 1.2.0, it is well with my user object in version 1.3.0.0 by cons, message that the user does not exist.
  19. Hi, thank you for sharing Question this UDF allows you to display an animated gif in a window and control it? I get an error when I run an example: here is the example: ; Pass GIF File path/name _GUICtrlCreateGIF("wait.gif", "", 10, 10) Here is the error: thank you for your help
×
×
  • Create New...