-
Posts
100 -
Joined
-
Last visited
Everything posted by edumanilha
-
Active Directory UDF - Help & Support (III)
edumanilha replied to water's topic in AutoIt General Help and Support
It worked! I can see the servers now...Thanks!- 883 replies
-
- active directory
- ad
-
(and 2 more)
Tagged with:
-
Active Directory UDF - Help & Support (III)
edumanilha replied to water's topic in AutoIt General Help and Support
Windescription = Non operational server...- 883 replies
-
- active directory
- ad
-
(and 2 more)
Tagged with:
-
Active Directory UDF - Help & Support (III)
edumanilha replied to water's topic in AutoIt General Help and Support
I got this error when I try to run this: #include<AD.au3> Local $iResult = _AD_Open() Local $aDCs = _AD_ListDomainControllers(False, True) For $iIndex = 1 to $aDCs[0][0] If $aDCs[$iIndex][6] = True Then ConsoleWrite("DC " & $aDCs[$iIndex][0] & " is a Global Catalog") Next _ArrayDisplay($aDCs) _AD_Close()- 883 replies
-
- active directory
- ad
-
(and 2 more)
Tagged with:
-
Active Directory UDF - Help & Support (III)
edumanilha replied to water's topic in AutoIt General Help and Support
Nice I'll try! Right now I'm in home office and need to use a vpn! If it fails I'll try into one of the branches or something! Again thanks for you time and help!- 883 replies
-
- active directory
- ad
-
(and 2 more)
Tagged with:
-
Active Directory UDF - Help & Support (III)
edumanilha replied to water's topic in AutoIt General Help and Support
I think the machines I need to reach are in the local server...Cause when I try default I'm calling the connected domain (company.com) besides I can see 8k machines equips or whatever...I cant see any the machines that are usually connected into the branches, just regular desktops and some unidentified equips... Some times when I need to connect to a branch server, I got a error msg and need to specify, like filxxx.com\username... so when I run the script without parameters I can't reach the branches I think. Maybe I need to aim filXXX.com directly! In that case what can I try? I tried filling only the forth parameter, filling the first parameter with just username, with filxxx\username etc...- 883 replies
-
- active directory
- ad
-
(and 2 more)
Tagged with:
-
Active Directory UDF - Help & Support (III)
edumanilha replied to water's topic in AutoIt General Help and Support
just one more question, so I won't need to change this part? I can't call the dc directly, so I'll scan all the domain right? _AD_Open()- 883 replies
-
- active directory
- ad
-
(and 2 more)
Tagged with:
-
Active Directory UDF - Help & Support (III)
edumanilha replied to water's topic in AutoIt General Help and Support
Thank you very much! I'll try! Have a nice day!- 883 replies
-
- active directory
- ad
-
(and 2 more)
Tagged with:
-
Active Directory UDF - Help & Support (III)
edumanilha replied to water's topic in AutoIt General Help and Support
Studying your questions I find out that the machines I need to reach have no account in the OU...The machines start with the: "equip type" "number" "FIL" "FIL number" Right now I tried some autoit ipscan to try another aproach but for some reason, maybe lag in my connection or the machines, mostly wireless, i couldn't get all the matches I saw in the server... Can I fetch the machines in DC consulting dhcp leases?- 883 replies
-
- active directory
- ad
-
(and 2 more)
Tagged with:
-
Active Directory UDF - Help & Support (III)
edumanilha replied to water's topic in AutoIt General Help and Support
another problem I run into is when I start the script default...I get all company machines (8k more or less) but no IP's... that the example I'm using: #include <AD.au3> _AD_Open() If @error Then MsgBox(0, "", "unable to connect") Exit EndIf $aComputers2 = _AD_GetObjectsInOU("", "(objectclass=computer)") _AD_Close() Local $results[1][1] TCPStartup() For $i = 1 To UBound($aComputers2) - 1 $ip_address = TCPNameToIP($aComputers2[$i]) ReDim $results[UBound($results) + 1][2] $results[UBound($results) - 1][0] = $aComputers2[$i] $results[UBound($results) - 1][1] = $ip_address ConsoleWrite($aComputers2[$i] & @CRLF) ConsoleWrite($ip_address & @CRLF) ConsoleWrite(@CRLF) Next TCPShutdown() _ArrayDisplay($results)- 883 replies
-
- active directory
- ad
-
(and 2 more)
Tagged with:
-
Active Directory UDF - Help & Support (III)
edumanilha replied to water's topic in AutoIt General Help and Support
Hello water! Everything is ok? I tried to use the ad udf, but I need to connect to a especific DC and get the machines from a branch... The name patern for the branchs is filXXX.com. I tried as the function description said so I leave the first tree values blank and put only the DC name on the fourth field...The script take some time but returns couldnt connect msg...When we need to connect to this dc from home office or field we need a specific username, I tried to fill the first two fields with that information without successs too... I'll try a little more, but can you help me figure out how to aim to a specific DC from a branch? thanks in advance!- 883 replies
-
- active directory
- ad
-
(and 2 more)
Tagged with:
-
Nice!
-
Hi, everyone! I Put a slider into my GDI GUI, but I can't make it transparent...I tried some examples and everything...I tried with winapi redraw: _WinAPI_RedrawWindow($hGUI4, 0, 0, $RDW_UPDATENOW) ;Your Code must lie in it _WinAPI_RedrawWindow($hGUI4, 0, 0, $RDW_VALIDATE) and the setbitmap func: Func _SetBitmap($hGUI, $hImage, $iOpacity) ;Func _SetBitmap($hGUI, $hImage, $iOpacity, $n_width = 200, $n_height = 200) Local $hScrDC, $hMemDC, $hBitmap, $hOld, $pSize, $tSize, $pSource, $tSource, $pBlend, $tBlend $hScrDC = _WinAPI_GetDC(0) $hMemDC = _WinAPI_CreateCompatibleDC($hScrDC) $hBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage) $hOld = _WinAPI_SelectObject($hMemDC, $hBitmap) $tSize = DllStructCreate($tagSIZE) $pSize = DllStructGetPtr($tSize) DllStructSetData($tSize, "X", _GDIPlus_ImageGetWidth($hImage)) DllStructSetData($tSize, "Y", _GDIPlus_ImageGetHeight($hImage)) ;DllStructSetData($tSize, "X", $n_width) ;DllStructSetData($tSize, "Y", $n_height) $tSource = DllStructCreate($tagPOINT) $pSource = DllStructGetPtr($tSource) $tBlend = DllStructCreate($tagBLENDFUNCTION) $pBlend = DllStructGetPtr($tBlend) DllStructSetData($tBlend, "Alpha", $iOpacity) DllStructSetData($tBlend, "Format", 1) _WinAPI_UpdateLayeredWindow($hGUI, $hScrDC, 0, $pSize, $hMemDC, $pSource, 0, $pBlend, $ULW_ALPHA) _WinAPI_ReleaseDC(0, $hScrDC) _WinAPI_SelectObject($hMemDC, $hOld) _WinAPI_DeleteObject($hBitmap) _WinAPI_DeleteDC($hMemDC) _GDIPlus_ImageDispose($hImage) EndFunc ;==>_SetBitmap And some dll example but from a very old topic... With winapi redraw, a black square appears on my image...And with setbitmap my script froze... WinSetTrans($hGUI5, "", GUICtrlRead($iSlider)) WinSetTrans($hGUI6, "", GUICtrlRead($iSlider)) _SetBitmap($SplashGUIlogo, $hSplashlogo,GUICtrlRead($iSlider)) Can anyone please give me a hand? Thanks in advance!
-
Ohhh...I see! Thanks for all your explanations! Yes! I can call the GUI, the right click menu and drop are there, I can get the drop message! But I have some problem with "pairing", when I open two puttys or more things get messy, the GUI2 stole the already paired Putty1...at 3 or 4 they are not pairing anymore. Tomorrow I'll try to find out why this is happening and try the follow while part... Thanks again for your great help! Good night!
-
😨 Hayai! I need a closer look to what you did here... example: why you inclement 2 here Func _GUIPUTTY() ReDim $GUIPUTTY[$b+2] and remove when you call the gui? $GUIPUTTY[$b-2] In this part: The two "then" here are some kind of "Or"? Local $aPutty = WinList ( "[CLASS:PuTTY]" ) If $aPutty[0][0] > 0 Then If $aPutty[0][0] > $b - 1 Then For $i = 1 To $b - 1 $PuTTY[$i] = $aPutty[$i][1] Next Else For $i = 1 To $aPutty[0][0] $PuTTY[$i] = $aPutty[$i][1] Next EndIf On the switch: You did a search for static names, closed the switch and started a new one? "previous Switch $aMsg[1]" EndSwitch For $i = 0 To $ubnd new Switch $aMsg[1] I always say it to myself: i learn so much from it and that's just a thing to make it worth :P even the script is worth on what it does later :D Yeah of course! What I'm learning here will have many uses! I like a lot when I have an idea and can put to work! I'm expecting something when I finish this script too!
-
LOL! Hero comes my savior again! I'm stuck again my friend, many times I almost dropped the project...Nights sleeping late, some discussion here about lies...Its been hard! the script is getting far more complicated than the initial idea...I think thats the final step! I'll take a look! thanks! I've declared like this: Global $GUIPUTTY[9] Global $PuTTY[9]
-
Hello everyone! A new problem arises from my previous topic... My GUI creates a second one to wrap a putty session and provide right click and drag and drop...Everything works fine with just one Putty and one GUI, But sometimes will be needed to call mmore than 1 session, and the problems start here... I have a follow script on the while, that target only for a Putty window, so if I have more than one, it stops working... If WinExists("[CLASS:PuTTY]") Then $PUTTYpos = WinGetPos("[CLASS:PuTTY]") $GUIpos = WinGetPos("Connect Helper") $xpos = $PUTTYpos[2] - $GUIpos[2] $ypos = $PUTTYpos[3] - $GUIpos[3] If $PUTTYpos[0] <> $GUIpos[0] Then WinMove($GUIPUTTY,"",$PUTTYpos[0] + $xpos,$PUTTYpos[1] + $ypos) EndIf EndIf and the create part look like this: The $b is because I tried some topics from the search before I come here for help...But I could not suceed and I'm a little lost about the follow part... Func _GUIPUTTY() $b += 1 Global $PuTTY = WinGetHandle("[CLASS:PuTTY]") sleep(500) $GUIPUTTY[$b] = GUICreate("Connect Helper Session", 200, 430, Default ,Default,$WS_POPUP,BitOR($WS_EX_TOOLWINDOW,$WS_EX_ACCEPTFILES),$PuTTY) _ChangeWindowMessageFilterEx($GUIPUTTY[$b], 0x233, 1) ; $WM_DROPFILES _ChangeWindowMessageFilterEx($GUIPUTTY[$b], $WM_COPYDATA, 1) ; redundant? _ChangeWindowMessageFilterEx($GUIPUTTY[$b], 0x0049, 1) ; $WM_COPYGLOBALDATA Global $InsertFile = GUICtrlCreateLabel("", 60, 310, 100, 100,-1,$WS_EX_STATICEDGE) GUICtrlSetState ($InsertFile, $GUI_DROPACCEPTED) GUICtrlSetTip ($InsertFile, "Arraste arquivos aqui para enviar!" & @CRLF & @CRLF & "Clique direito para menu!" ) GUICtrlSetBkColor($InsertFile,0xFFFFFF) GUISetState() WinSetTrans($GUIPUTTY[$b],"",40) GUISetControlsVisible($GUIPUTTY[$b]) WinMove($GUIPUTTY[$b],"",@DesktopWidth/2 - 342,@DesktopHeight/2 - 215,200,430) WinMove($PuTTY,"",@DesktopWidth/2 - 350,@DesktopHeight/2 - 215,708,438) $PUTTYID = WinGetProcess("[CLASS:PuTTY]") $GUIID = WinGetProcess($GUIPUTTY[$b]) EndFunc I'm using the advanced GuiGetMsg for multiples GUI: #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> Global $g_hGUI2 = 9999, $g_idButton3 ; Predeclare the variables with dummy values to prevent firing the Case statements, only for GUI this time gui1() Func gui1() Local $hGUI1 = GUICreate("Gui 1", 200, 200, 100, 100) Local $idButton1 = GUICtrlCreateButton("Msgbox 1", 10, 10, 80, 30) Local $idButton2 = GUICtrlCreateButton("Show Gui 2", 10, 60, 80, 30) GUISetState() Local $aMsg While 1 $aMsg = GUIGetMsg(1) ; Use advanced parameter to get array Switch $aMsg[1] ; check which GUI sent the message Case $hGUI1 Switch $aMsg[0] ; Now check for the messages for $hGUI1 Case $GUI_EVENT_CLOSE ; If we get the CLOSE message from this GUI - we exit <<<<<<<<<<<<<<< ExitLoop Case $idButton1 MsgBox($MB_OK, "MsgBox 1", "Test from Gui 1") Case $idButton2 GUICtrlSetState($idButton2, $GUI_DISABLE) gui2() EndSwitch Case $g_hGUI2 Switch $aMsg[0] ; Now check for the messages for $g_hGUI2 Case $GUI_EVENT_CLOSE ; If we get the CLOSE message from this GUI - we just delete the GUI <<<<<<<<<<<<<<< GUIDelete($g_hGUI2) GUICtrlSetState($idButton2, $GUI_ENABLE) Case $g_idButton3 MsgBox($MB_OK, "MsgBox", "Test from Gui 2") EndSwitch EndSwitch WEnd EndFunc ;==>gui1 Func gui2() $g_hGUI2 = GUICreate("Gui 2", 200, 200, 350, 350) Local $g_idButton3 = GUICtrlCreateButton("MsgBox 2", 10, 10, 80, 30) GUISetState() EndFunc ;==>gui2 Someone have been troubled for something similar? Can a good soul point me to the right direction? Thanks guys my script whouldn't come so far without your help!
-
Problem with multiple GUI's... [SOLVED]
edumanilha replied to edumanilha's topic in AutoIt GUI Help and Support
I was about to ask, because I need to block users input at some point of the script! Man! Thank you very much! I changed the "OR" for "comas", and put the _ChangeWindowMessageFilterExchange from the thread you show me, into the drag and drop GUI to bypass requireadmin! Thank you very much for your time and help again! Everything seens to be working fine now! I just need to put some align and movement checks an the others functions, but I think I can go from here! You have helped me a lot!!! -
Problem with multiple GUI's... [SOLVED]
edumanilha replied to edumanilha's topic in AutoIt GUI Help and Support
10...Buts thats strange as I said before when I try the stand alone exe, works fine...The only difference between them that I can Think, is that the main gui use #requireadmin... EDIT: NOOOOOOOO!!! It's the requireadmin....OMG... -
Problem with multiple GUI's... [SOLVED]
edumanilha replied to edumanilha's topic in AutoIt GUI Help and Support
Ok, I'll try like this...But still got only right click menu...Drag and drop still disabled... -
Problem with multiple GUI's... [SOLVED]
edumanilha replied to edumanilha's topic in AutoIt GUI Help and Support
Oh god...All the trouble for this? I'll try here! EDIT: Didn't work... What you did? I think someone used this to prevent user write things down in the field...Its not supposed to block the right click and the drop...My stand alone exe works fine with this parameter... -
Problem with multiple GUI's... [SOLVED]
edumanilha replied to edumanilha's topic in AutoIt GUI Help and Support
here the cleaned up script...I did some more tests with this resumed script...same result! All the main GUI's inside a function like the wiki example, and all the Main GUi's before the loop and the second GUI been called like a function... @Aelc can you do a putty session? first thing he looks is for a running putty session... test.zip -
Problem with multiple GUI's... [SOLVED]
edumanilha replied to edumanilha's topic in AutoIt GUI Help and Support
I'll try to resume so you can have some idea whats is happening... -
Problem with multiple GUI's... [SOLVED]
edumanilha replied to edumanilha's topic in AutoIt GUI Help and Support
Sorry I didn't saw you edit, I was typing the time you did... This hGUI1 thing is about the wiki example, not my actual script... my first tries was calling the func from my main GUI...I can try to modify again and test... I tried to open GUIPUTTY together with the others using HIDE and then SHOW, when I needed too, can be done...But when I tried that way script didn't work too... The main problem is that I can't call the GUI with functional right click menu and the dropaccepted... Only scenario everything worked is calling the .exe with the complete script stand alone...But when I try to call this exe using "run" the only thing working is right click menu, the darg and drop stops... I don't know what I'm doing wrong... -
Problem with multiple GUI's... [SOLVED]
edumanilha replied to edumanilha's topic in AutoIt GUI Help and Support
sadly you didn't post an executable script... i tried to put it together ... so my answer could be more specific Hello @Aelc , the first checks are not my problem...I did the "Or" to avoid multiples checks and dispensable lines, and because I found in the forum this can be done like this... But thanks for your answer! I didn't posted a executable script because its too big and have some UDF's... -
Problem with multiple GUI's... [SOLVED]
edumanilha replied to edumanilha's topic in AutoIt GUI Help and Support
Hi @JLogan3o13 , indeed... The script look like this: while 1 $aMsg = GUIGetMsg(1) ; Use advanced parameter to get array Switch $aMsg[1]; check which GUI sent the message Case $hGUI Or $hGUI2 Or $hGUI3 Or $hGUI4 Switch $aMsg[0] Case blablabla do this do that Open PuTTY session _GUIPUTTY(); drag and drop and right click menu over the PuTTY window Case hocuspocus etc etc EndSwitch Case $GUIPUTTY Switch $aMsg[0] Case $GUI_EVENT_CLOSE WinClose("[CLASS:PuTTY]") Exit Case $GUI_EVENT_SECONDARYDOWN Local $MenuButtonsArray[5] = ["Copiar Bemasat.xml", "Copiar config.properties", "teste","teste","Reboot"] ; Open the rightclick Menu. See decleration of $MenuButtonsArray above. Local $MenuSelect = _Metro_RightClickMenu($GUIPUTTY, 150, $MenuButtonsArray) Switch $MenuSelect ;Above function returns the index number of the selected button from the provided buttons array. Case "0" Case "1" Case "2" Case "3" Case "4" $ret = _SSHSend( $ConnectedSocket , "Reboot" &@crlf) EndSwitch Case $GUI_EVENT_PRIMARYDOWN Case $GUI_EVENT_DROPPED MsgBox($MB_TOPMOST, "","File accepted!" & @GUI_DragFile) EndSwitch EndSwitch WEnd the function: Func _GUIPUTTY() Global $PuTTY = WinGetHandle("[CLASS:PuTTY]") $GUIPUTTY = GUICreate("Connect Helper", 200, 430, Default ,Default,$WS_POPUP,BitOR($WS_EX_TOOLWINDOW,$WS_EX_ACCEPTFILES),$PuTTY) WinMove($GUIPUTTY,"",@DesktopWidth/2 - 342,@DesktopHeight/2 - 215,200,430) Global $InsertFile = GUICtrlCreateLabel("", 50, 310, 100, 100,-1,$WS_EX_STATICEDGE) GUICtrlSetState ($InsertFile, $GUI_DROPACCEPTED) GUICtrlSetTip ($InsertFile, "Drag files here to send!" & @CRLF & @CRLF & "Right click for menu!" ) GUICtrlSetBkColor($InsertFile,0xFFFFFF) GUISetState() WinSetTrans($GUIPUTTY,"",40) GUISetControlsVisible($GUIPUTTY) WinMove($PuTTY,"",@DesktopWidth/2 - 350,@DesktopHeight/2 - 215,708,438) sleep(200) Global $MainPos = WinGetPos("[CLASS:PuTTY]") $iX1 = $MainPos[0] $iY1 = $MainPos[1] $iX2 = $iX1 $iY2 = $iY1 EndFunc The main and second GUI show UP, in the second I have right click but the event dropped don't trigger...And the cases work fine for main GUI... in the example look like this: The main GUI inside a function that have the loop...I tried like this, and with the main GUI ouside a function, before the loop... #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> Global $g_hGUI2 = 9999, $g_idButton3 ; Predeclare the variables with dummy values to prevent firing the Case statements, only for GUI this time gui1() Func gui1() Local $hGUI1 = GUICreate("Gui 1", 200, 200, 100, 100) Local $idButton1 = GUICtrlCreateButton("Msgbox 1", 10, 10, 80, 30) Local $idButton2 = GUICtrlCreateButton("Show Gui 2", 10, 60, 80, 30) GUISetState() Local $aMsg While 1 $aMsg = GUIGetMsg(1) ; Use advanced parameter to get array Thanks for your support!