Jump to content

mohammadezazi

Active Members
  • Posts

    66
  • Joined

  • Last visited

Everything posted by mohammadezazi

  1. Hi Admin ! Excuse me Please delete this post. I can't do it.
  2. Hi. I want to get the IP address of a client in network. I couldn't find the command for it. please help me. for example : $IP = getremoteIP("remotecomputer")
  3. Tnxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx It works wery nice......... Thank you againnnnnnnnnnnnnn
  4. Hi I've wrote a script to logon remote on my servers. I want to send the password also to server. so the logon must be done automatically. I've used this code: $oRDP = ObjCreate("MsTscAx.MsTscAx") GUICreate($SerName, @DesktopWidth-50, @DesktopHeight-70) $GUIActiveX = GUICtrlCreateObj($oRDP, 5, 5, @DesktopWidth-60, @DesktopHeight-80) GUISetState() $oRDP.Server = $SerName $oRDP.UserName = $UserName $oRDP.Connect() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd GUIDelete() Please help me to send password also. I couln't find solution for my problem in this forum There are several softwares that can send password. such "RemoteDesktop Manager", ... . But I want to do it by Autoit.
  5. Hi. Thanks for any help. Without IE borders and menus.
  6. I could not do it by logon_flag. But I used command line switchs to send User1s variables into App2.exe. and it works now. Thanks alot.
  7. How I can get the LoggedOn user name and its environment parameters in a RunAsed application. I have an App1.EXE file that runs in User1 environment. (Is a domain user) App1.EXE calls an other Application (App2.EXE) by Runas command (runas user: user2) But I can't access User1 environment variables (Such as its HKEY_CIRRENT_USER Registry keys, or Documents and settings ...) in App2.EXE. ! How the User1's variables are accessible in App2 Code ? Plz help me.
  8. Veryyyyyyyyy gooooooooooooooooodddd Thanks alot.
  9. This is my code : $Maingui = GUICreate("", 167, 177, -1, -1, $WS_POPUP, $WS_EX_TOOLWINDOW) GUISetState() Do $msg = GUIGetMsg() Until $msg = $GUI_EVENT_SECONDARYUP I want to move this window by mouse left key. But I can't. Thans for any help.
  10. Very goooooooooooooooooooooooooooooooooooooooooooooooooooooooooooood Thankssssssssssssssssssssssssssssssssssss
  11. Thank you very much. Ill reply you the result.
  12. What is the way to create a GUI with my defined MASK shape ?
  13. Hi. Please help me to create a share folder with these permissions (in Domain invironment): Just: Everyone Read CurrentUser Read and Write I use a code such this : (But it is not that i want) The Share permissions is not important for me, but the Security permissions is my weakness. #include <Permissions.au3> #include <Process.au3> #include <Misc.au3> #include <GUIConstantsEx.au3> _InitiatePermissionResources() If DirCreate("d:\"&@ComputerName) Then $mypath = "d:\"&@ComputerName ElseIf DirCreate("E:\"&@ComputerName) Then $mypath = "E:\"&@ComputerName ElseIf DirCreate("F:\"&@ComputerName) Then $mypath = "F:\"&@ComputerName ElseIf DirCreate(@DocumentsCommonDir&"\"&@ComputerName) Then $mypath = @DocumentsCommonDir&"\"&@ComputerName EndIf Runwait(@ComSpec & " /c net share "&@ComputerName&"="&$mypath ) $TI = TimerInit() $ret = _myGrantReadAccess($mypath,$SE_FILE_OBJECT,'Administrators') $ret = _myGrantAllAccess($mypath) $TD = TimerDiff($TI) _ClosePermissionResources() Func _myGrantReadAccess($oName, $_SE_OBJECT_TYPE = $SE_FILE_OBJECT, $SetOwner ='Administrators', $Recurse = 1) Local $aPerm[6][3] $aPerm[0][0] = 'Everyone' $aPerm[0][1] = 1 $aPerm[0][2] = $GENERIC_WRITE ;$aPerm[1][0] = $regloginuser $aPerm[1][0] = 'Administrators' $aPerm[1][1] = 1 $aPerm[1][2] = $GENERIC_ALL $aPerm[2][0] = 'System' $aPerm[2][1] = 1 $aPerm[2][2] = $GENERIC_ALL Return _SetObjectPermissions($oName, $aPerm, $_SE_OBJECT_TYPE, $SetOwner, 1, $Recurse) EndFunc ;==>_GrantReadAccess Func _myGrantAllAccess($oName, $_SE_OBJECT_TYPE = $SE_FILE_OBJECT, $SetOwner = 'Administrators', $Recurse = 1) Local $aPerm[1][3] $aPerm[0][0] = 'Everyone' $aPerm[0][1] = 1 $aPerm[0][2] = $GENERIC_ALL Return _SetObjectPermissions($oName, $aPerm, $_SE_OBJECT_TYPE, $SetOwner, 1, $Recurse) EndFunc ;==>_GrantAllAccess
  14. And how it is done by AutoIt? I've an aplication that has been written by AutoIt. It has an infinite loop for doing some things and starts from Client logging on until it logs off. So I want to convert it to service. what is the way? Thanks for any guidance. And in other scenario if there is not any loop in it, then can it would be converted to a service yet?
  15. Thank you and Excuse me. It is a good way to do it. Thanks again.
  16. Thank you very much.
  17. It is my code: Local $gui = GUICreate("", 617, 170, -1,-1,$WS_POPUP) GUISetBkColor(0x3399FF) GUISetFont(9, 400, -1, "Tahoma") GUICtrlCreateLabel("Some text", 2, 2, 613, 140,$SS_WHITERECT) GUICtrlSetColor(-1, 0x000000) ; Red $taiid = GUICtrlCreateButton("OK", 50, 145, 60, 20) $cancel = GUICtrlCreateButton("Cansel", 500, 145, 60, 20) GUISetState(@SW_SHOW) Do Local $msg = GUIGetMsg() Switch $msg case $taiid MsgBox(0,"OK","OK") Case $cancel, $GUI_EVENT_CLOSE GUIDelete($gui) ExitLoop EndSwitch Until 0 Why the text does not be shown? Or how can define label's text color? I want to the text color remain Red. and the window must be in this format.
  18. Thanks. It is perfect and seems to be sufficient.
  19. No It is not appropriate for my task. I need to hyperlink a string located in a long text. Such this: Visit our site at http://www.oursite.com for more information. Just the web URL must be hyperlink.
  20. I've some command prompt windows, opened by AutoIt script to ping some Hosts. I need an AutoIt command to Tile them.
  21. Oh! Thanks. Excuse me for my weakness. I don't know there is a function for this.
  22. Thank you very much. It works fine. My problem resolved by it.
  23. Please give me a small code that increase transparency of a GUI window from 100 to 255 slowly. By a FOR-NEXT loop.
  24. It is my Code: #include <GuiConstants.au3> #include <ButtonConstants.au3> #include <EditConstants.au3> #include <WindowsConstants.au3> #include <Constants.au3> #include <Process.au3> #include <GDIPlus.au3> #include <StaticConstants.au3> #include <Misc.au3> #include <GUIConstantsEx.au3> Local Const $STM_SETIMAGE = 0x0172 Local $hgui = GUICreate("Log On to Application", 411, 265,-1,-1,0) Local $hPic = GUICtrlCreatePic("", 50, 50, 30, 30,$SS_BITMAP) _GDIPlus_Startup() $hHBmp = _GDIPlus_BMPFromMemory(Binary(OkTik()), True) GUICtrlSendMsg(-1, $STM_SETIMAGE, $IMAGE_BITMAP, $hHBmp) GUISetState() Do $msg = GUIGetMsg() Until $msg = $hPic GUIDelete() ;========================================= Func OkTik() Local _ $OkTik = '0x424D8E0900000000000036000000280000001E0000001A00000001001800000000000000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFEFEFFFEFFFEFEFEFAFCF9FFFFFFB5D8B2DCECDDFCFDFCFCFDFCFEFEFEFEFEFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFCFDFCFFFFFFE7F2E6208C1F6EB468FFFFFFFBFCFBFEFEFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFEFEFCFDFCFFFEFFF0F7EF399E34018100048201B7DBB4FFFFFFFBFDFBFEFEFEFFFFFFFEFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000FFFFFFFFFFFFFFFFFFFEFEFEFFFEFEFEFFFEFCFDFCFEFEFEF6FBF548A9410086001490040889001F9318E7F3E6FEFEFEFCFDFCFEFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFCFDFCFEFEFEF9FCF953B14A018B0016940310910014930202890051AE49FFFEFFFBFDFBFDFEFDFEFEFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF' $OkTik &= 'FF0000FFFFFFFEFFFEFFFFFFFEFEFEFCFDFBFFFFFFF8FBF756B64D049200189A03139700139700129600179703008C008BCA83FFFFFFFAFCFAFEFEFEFFFFFFFEFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000FFFFFFFFFFFFFEFFFEFBFDFBFFFFFFF3FAF252B7470698001BA003169D00169C00159C00159A00159A001599020B9401BDE2B8FFFFFFFBFDFBFEFEFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000FEFFFFFEFFFEFAFDFAFFFFFFEBF7E848B83A0B9E001EA60319A30018A20019A1001AA102179F00179F00199F01119B0023A216E1F2DFFFFFFFFCFDFCFEFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000FDFEFDFAFDFAFFFFFFDCF2D83AB62810A50020AB031BA9001BA8001CA7001AA6000FA1001BA50119A30019A2001CA4020C9C0045B337F7FBF6FCFDFCFDFEFCFEFEFEFEFEFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000FEFEFEFFFFFFC5EBBD2CB51715AD0023B1031EAE001EAD001FAD001AAB0020AC0666C55617A7001DA9001BA8001AA6001FA8030A9F006AC45CFFFFFFFBFDFAFDFDFDFFFFFFFEFEFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000F1FAEFA1E0951EB5051DB40025B60221B40021B30021B30021B20211AC00A1DD98FFFFFF47BD3113AA0020AD021DAC001D' $OkTik &= 'AB0020AC030BA3008DD482FFFFFFFAFDFAFEFEFEFFFFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000095DE851CB90022BA0027BB0223BA0023B90024B80025B80313B10096DB87FFFFFFFEFEFECFEEC91CB10420B10220B1001FB0001FAF0020AF0311A900ABE0A1FFFFFFFAFDFAFEFEFEFEFFFEFEFFFEFFFFFFFFFFFFFFFFFFFFFFFF0000FDFEFD94DF8318BD002AC00326BF0027BE0027BD0216B80092DD82FFFFFFFBFDFBFBFDFBFFFFFF93DB8411B10026B70321B50021B40022B3001FB2011AAF05BFE8B7FFFFFFFAFDFAFEFEFEFFFFFFFEFEFEFFFFFFFFFFFFFFFFFF0000FBFDFAFFFFFF76DA601AC1002EC50428C2011ABF0097E186FFFFFFFBFDFAFDFEFDFDFEFDFCFEFBFEFEFE5FCD4816B70028BB0323B80022B80025B8011EB50025B60DCEEEC7FFFFFFFAFDFAFEFEFEFFFFFFFFFFFFFFFFFFFFFFFF0000FCFDFBFDFEFCF8FDF653D3351BC50024C602A5E795FFFFFFFBFDFAFDFDFDFFFFFFFEFFFEFDFDFCFDFEFDECF9E93DC6211EBC0028BF0225BD0025BC0027BC011EB8002EBD14D7F2D1FFFFFFFAFDFAFEFEFEFFFFFFFEFEFEFFFFFF0000FEFEFEFCFDFCFFFFFFDFF7D941D229B9EEADFFFFFFFBFDFAFEFEFEFEFEFFFFFEFFFFFFFFFEFEFEFCFDFBFFFFFFD4F3CD2BC40C25C2002AC20127C10026C0002AC1021FBC0033C11AD8F3D3FFFFFFFAFDFAFEFEFEFFFFFFFEFFFE0000FFFFFFFFFEFFFEFEFE' $OkTik &= 'FFFFFFF7FDF4FFFFFFFCFEFCFEFEFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFEFEFEFBFDFBFFFFFFBDEDB122C5012AC7022BC60029C50028C4002BC40220C00034C519D5F2CFFFFFFFFAFDF9FEFEFEFFFFFF0000FEFEFEFFFFFFFFFFFFFDFEFDFFFFFFFDFEFCFEFFFEFFFFFFFEFEFEFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFEFEFEFBFDFAFFFFFFAAEA9B1FC9002DCB022CCA002BC9002AC8002DC80223C50031C713C9F0BFFFFFFFFAFDFAFEFEFE0000FFFFFFFEFEFEFFFFFFFEFEFEFEFEFEFEFEFEFFFEFFFEFEFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFEFEFFFFFFFEFEFDFBFDFAFFFFFF9EE88A1FCD0030CF032ECE002DCD002CCC002FCC0227C9002AC908B2EBA4FFFFFFFDFEFC0000FFFFFFFFFFFFFFFFFFFEFFFEFEFFFEFFFFFFFEFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFEFEFEFEFEFEFEFDFBFDFAFFFFFF96E97F21D10032D30330D2002FD1002ED00030D0012CCE0023CB0092E580FFFEFF0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDFEFDFBFDFBFFFFFF94EA7C23D50033D70332D60030D50030D40031D40131D3011FCF006CDF4D0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFEFFFFFFFFFDFEFDFBFDFBFF' $OkTik &= 'FFFF97ED7F26D90035DB0234DA0032D90032D80033D8012FD60339D70C0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFDFEFDFCFEFBFFFFFF9FF0872ADE0035DF0136DE0134DD0037DD0227D900B2F1A10000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDFEFDFBFDFAFFFFFFABF3952FE30035E3003CE3042ADF0074EA51FFFFFF0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFEFFFFFFFDFEFDFBFDFAFFFFFFBAF7A938E8092FE6003FE70FE6FBE0FEFEFE0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFEFEFBFEFAFFFFFFCDFABF43EC1C9BF57FFFFFFFFCFEFB0000' Return $OkTik EndFunc ;========================================= Func _GDIPlus_BMPFromMemory($bImage, $hHBitmap = False) If Not IsBinary($bImage) Then Return SetError(1, 0, 0) Local $aResult Local Const $memBitmap = Binary($bImage) ;load image saved in variable (memory) and convert it to binary Local Const $len = BinaryLen($memBitmap) ;get length of image Local Const $hData = _MemGlobalAlloc($len, $GMEM_MOVEABLE) ;allocates movable memory ($GMEM_MOVEABLE = 0x0002) Local Const $pData = _MemGlobalLock($hData) ;translate the handle into a pointer Local $tMem = DllStructCreate("byte[" & $len & "]", $pData) ;create struct DllStructSetData($tMem, 1, $memBitmap) ;fill struct with image data _MemGlobalUnlock($hData) ;decrements the lock count associated with a memory object that was allocated with GMEM_MOVEABLE $aResult = DllCall("ole32.dll", "int", "CreateStreamOnHGlobal", "handle", $pData, "int", True, "ptr*", 0) ;Creates a stream object that uses an HGLOBAL memory handle to store the stream contents If @error Then Return SetError(2, 0, 0) Local Const $hStream = $aResult[3] $aResult = DllCall($ghGDIPDll, "uint", "GdipCreateBitmapFromStream", "ptr", $hStream, "int*", 0) ;Creates a Bitmap object based on an IStream COM interface If @error Then Return SetError(3, 0, 0) Local Const $hBitmap = $aResult[2] Local $tVARIANT = DllStructCreate("word vt;word r1;word r2;word r3;ptr data; ptr") DllCall("oleaut32.dll", "long", "DispCallFunc", "ptr", $hStream, "dword", 8 + 8 * @AutoItX64, _ "dword", 4, "dword", 23, "dword", 0, "ptr", 0, "ptr", 0, "ptr", DllStructGetPtr($tVARIANT)) ;release memory from $hStream to avoid memory leak $tMem = 0 $tVARIANT = 0 If $hHBitmap Then Local Const $hHBmp = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBitmap) _GDIPlus_BitmapDispose($hBitmap) Return $hHBmp EndIf Return $hBitmap EndFunc ;==>_GDIPlus_BMPFromMemory Why it does not work?
×
×
  • Create New...