Jump to content

Recommended Posts

Posted (edited)
17 minutes ago, RaviRai said:

My organisation has no other option :(

I really don't care and find it pretty impolite you go willingly against our forum rules because of that.... ... so next post on this topic will get you banned.... period!

Jos

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Monica
      Hi guys!
      I have a Window and I want to interact with its controls.
      Using AutoIt Window Info, I can grab only the window title and class, and nothing else. All its controls is not recognized by the AutoIt tool.
      So can someone help me? Is there any solution to interact with this window controls? I must give focus to, read and write a textbox in this window.
      Thanks !!!
      Monica
    • By TheAutomator
      Hi everyone  ,
      i'm trying to make some sort of full screen console window where some of the text must be non-editable like windows CMD.exe.
      Text already typed before pressing enter or the working folder 'C:\...>' is read only in CMD.exe and I want to know if mimicking this behavior in an edit control is possible.
       
      My attempt to make a console makes all the [A-Za-z0-9] keys a hotkey and the main edit control is set to read only.
      Every time the user types something the hotkey function is triggered, the cursor in the edit control is set to the end of the text and the character you typed is added to the edit.
      If you try to press the {backspace} key when you are at the edge of some text that is read only nothing happens.
       
      This works but I guess it is not the best or most clean way to make something like this..
      Can someone give me some advice or help me make a better function for having full control over text in the edit control?
       
      kind regards, 
      TheAutomator
       
      #include <GuiEdit.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $Form = GUICreate("Console", @DesktopWidth, @DesktopHeight, 0, 0, BitOR($WS_POPUP, $DS_SETFOREGROUND), $WS_EX_TOPMOST) GUISetBkColor(0x000000) $Console = GUICtrlCreateEdit('Loading...', 32, 32, @DesktopWidth-15, @DesktopHeight - 64, BitOR($ES_READONLY,$WS_VSCROLL), 0) GUICtrlSetFont(-1, 28, 400, 0, 'OCR A Extended') GUICtrlSetColor(-1, 0x00FF00) GUICtrlSetBkColor(-1, 0x000000) GUICtrlSetCursor (-1, 2) _GUICtrlEdit_SetMargins( -1, $EC_RIGHTMARGIN, Default, 49) GUISetState(@SW_SHOW) ;################################################################################################################## Global $keys = 'abcdefghijklmnopqrstuvwxyz _ABCDEFGHIJKLMNOPQRSTUVWXYZ' ;################################################################################################################## For $_ = 1 To StringLen($keys) HotKeySet( StringMid($keys,$_,1), 'keypress') Next For $_ = 0 To 9 HotKeySet($_, 'keypress') HotKeySet('{numpad'&$_&'}', 'keypress') Next HotKeySet('{bs}','Keypress') HotKeySet('{enter}','Enter') _GUICtrlEdit_AppendText($Console, @CRLF&'Type a command:') $MIN = StringLen(GUICtrlRead($Console)) + 1 $MAX = $MIN ;################################################################################################################## Func Keypress() Local $key = @HotKeyPressed If StringLen($key) = 1 Then _GUICtrlEdit_AppendText($Console, $key) $MAX += 1 ElseIf StringRegExp($key,'\{numpad[0-9]\}') Then _GUICtrlEdit_AppendText($Console, StringMid($key,8,1)) $MAX += 1 ElseIf $key = '{bs}' Then If $max = $min then Return Else Local $len = StringLen(GUICtrlRead($Console)) _GUICtrlEdit_SetSel($Console, $len - 1, $len) _GUICtrlEdit_ReplaceSel($Console, '') $MAX -= 1 EndIf EndIf EndFunc Func Enter();handle typed commands when ENTER is pressed: Switch StringStripWS(StringLower(StringMid(GUICtrlRead($Console),$min,$max)),8) Case '' Beep(1000,50) Case 'clear' GUICtrlSetData($Console,'Command:') $MIN = StringLen(GUICtrlRead($Console)) + 1 $MAX = $MIN Return Case 'quit' Quit() Case Else _GUICtrlEdit_AppendText($Console, @CRLF&@TAB&'Unknown command!') EndSwitch _GUICtrlEdit_AppendText($Console, @CRLF&'Type a command:') $MIN = StringLen(GUICtrlRead($Console)) + 1 $MAX = $MIN EndFunc ;============================================================= Func Quit() _GUICtrlEdit_AppendText($Console, @CRLF&@TAB&'Goodbye...') Sleep(1500) Exit EndFunc While True If GUIGetMsg() = $GUI_EVENT_CLOSE Then Quit() EndIf WEnd
    • By Decipher
      Please see this post

      I've started try to code this but I'm having trouble with the DLL syntax and I'd like to be sure that the system is safe to power down before I force it to do so.

      I've tried:


      $iReturnValue = DllCall("advapi32.dll", "int", "RegFlushKey", "long", "HKEY_CLASSES_ROOT") if @error Then MsgBox(0, "", "Fail!") MsgBox(0, "Flush Home Key Classes Root", $iReturnValue) $bReturnValue = DllCall("kernel32.dll", "BOOL", "FlushFileBuffers", "HANDLE", "\\.\" & @HomeDrive) if @error Then MsgBox(0, "", "Fail!") MsgBox(0, "Flush System Drive Cache", $iReturnValue);Should return 1=true or 0=false.
      But I can't determine if these functions are working correctly. Any help is greatly appreciated like always.
×
×
  • Create New...