Jump to content

reb

Active Members
  • Posts

    218
  • Joined

  • Last visited

  • Days Won

    1

reb last won the day on May 19 2014

reb had the most liked content!

About reb

  • Birthday 03/19/1936

Profile Information

  • Location
    USA OHIO
  • Interests
    Woodworking
    Travel
    Programing the computer for myself

Recent Profile Visitors

801 profile views

reb's Achievements

  1. Why would this not work? It seems like your "security info" would not exist but only the new values placed there.
  2. Your script is untitled. Save it and every thing should work.
  3. @ Melba23 Thanks for the correction. I was fooled by numpad2 being first. pressing 1 did not work and then I only pressed 1 & 2 together, never 2 alone. I Learned somethings new Today. 1. Test all possibilities & 2. Your method of handling it. Happy New Year REB
  4. This should do it. HotKeySet("{Numpad2}{Numpad1}","_Start") while 11 Sleep(100) WEnd Func _Start () MsgBox(0,"","Got it") EndFunc Happy new year.
  5. Try this link https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CCEQFjAAahUKEwiK9MLh3ojJAhWETCYKHXKKBWw&url=https%3A%2F%2Fwww.autoitscript.com%2Fforum%2Fapplications%2Fcore%2Finterface%2Ffile%2Fattachment.php%3Fid%3D25713&usg=AFQjCNGA4R2RA95c2T1n89qSdpdyNNcfHA&cad=rja
  6. reb

    RegEx course

    If the lessons are all as clear as section 1 I might learn something after all. Thanks for the link
  7. Labels will do the job. #include <GUIConstantsEx.au3> #include <GUIConstants.au3> #include <WindowsConstants.au3> #include <WinAPI.au3> Local $Form1 = GUICreate("button text color test", 250, 250) ;BUTTON 1 WITH NO TEXT COLOR CHANGE Local $button1 = GUICtrlCreateLabel("Line 1 of text" & @CRLF & "Line 2 of text" _ & @CRLF & "Line 3 of text", 50, 10, 150, 70) ; , BitOR($BS_MULTILINE,$BS_LEFT)) ;BUTTON 2 WITH TEXT COLOR CHANGE Local $button2 = GUICtrlCreateLabel("Line 1 of text" & @CRLF & "Line 2 of text" _ & @CRLF & "Line 3 of text", 50, 100, 150, 70) ; , BitOR($BS_MULTILINE,$BS_LEFT)) GUICtrlSetColor ( $button2, 0xCC0066 ) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $Button1 MsgBox(0, "ControlID = " & $Button1, "Button 1 was Pressed!") Case $Button2 MsgBox(0, "ControlID = " & $Button1, "Button 2 was Pressed!") EndSwitch WEnd
  8. This Limits the x,y co-ordinates ; Original code - martin #include <GuiconstantsEx.au3> #include <WindowsConstants.au3> #include <SendMessage.au3> #include <MsgBoxConstants.au3> #include <Array.au3> Global Const $SC_DRAGMOVE = 0xF012 Local $xlimit = 300, $xlimit2 = 900, $Ylimit = 300, $Ylimit2 = 500 Local $Pos, $mP[1] HotKeySet("{ESC}", "On_Exit") local $hGUI = GUICreate("X", 100, 100, -1, -1, $WS_POPUP) GUISetBkColor(0x00FF00, $hGUI) $hButton = GUICtrlCreateButton("Test", 10, 35, 80, 30) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_PRIMARYDOWN _SendMessage($hGUI, $WM_SYSCOMMAND, $SC_DRAGMOVE, 0) Case $hButton On_Button() EndSwitch Checkx() WEnd Func On_Button() MsgBox(0, "Hi", "Button Pressed") EndFunc ;==>On_Button Func On_Exit() Exit EndFunc ;==>On_Exit Func Checkx() $Info = GUIGetCursorInfo($hGUI) if $Info[2] = 1 then return $Pos = WinGetPos($hGUI,"") ; x, y, width, height if $Pos > $xlimit or $Pos < $xlimit2 then MsgBox(0,"","Returned") return EndIf Select Case $Pos[0] < $xlimit and $Info[2] = 0 WinMove($hGUI,"",$xlimit,$Pos[1]) if $Pos[1] < $ylimit Then WinMove($hGUI,"",$Pos[0], $ylimit) if $Pos[1] > $ylimit2 Then WinMove($hGUI,"",$Pos[0], $ylimit2) Case $Pos[0] > $xlimit2 and $Info[2] = 0 WinMove($hGUI,"",$xlimit2,$Pos[1]) if $Pos[1] < $ylimit Then WinMove($hGUI,"",$Pos[0], $ylimit) if $Pos[1] > $ylimit2 Then WinMove($hGUI,"",$Pos[0], $ylimit2) Case $Pos[0] > $xlimit and $Info[2] = 0 if $Pos[1] < $ylimit Then WinMove($hGUI,"",$Pos[0], $ylimit) if $Pos[1] > $ylimit2 Then WinMove($hGUI,"",$Pos[0], $ylimit2) EndSelect EndFunc
  9. WinGetPos returns an arry $aArray[0] = X position $aArray[1] = Y position $aArray[2] = Width $aArray[3] = Height if x y exceeds your desired position then reset window to what you want.
  10. @ BrewManNH I revised my post just above yours using label constants. I see your point. Thank you. #include <Constants.au3> #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <ColorConstantS.au3> #include <FontConstants.au3> #include "ColorConstants.au3" Opt("GUIOnEventMode", 1) $GUI = GUICreate("GUI", 250, 300) GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit") $bBm = "Button" & @CRLF & "One" $Button = GUICtrlCreateLabel(@CRLF & $bBm, 160, 185, 85, 110, $SS_CENTER,$WS_EX_CLIENTEDGE) ;, $SS_CENTERIMAGE)) ; $BS_MULTILINE, $BS_CENTER, $BS_VCENTER, $WS_EX_WINDOWEDGE)) GUICtrlSetBkColor(-1, 0xFFFFFF) GUICtrlSetFont($Button, 14, 800, 0, "MV Boli", 5) GUICtrlSetColor($Button, 0xFF0000) GUICtrlSetOnEvent($Button, "_Exit") GUISetState() While 1 Sleep(100) WEnd Func _Exit() Exit EndFunc ;==>_Exit .
  11. I guess you could always fake a button with a label. include <Constants.au3> #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <ColorConstantS.au3> #include <FontConstants.au3> #include "ColorConstants.au3" Opt("GUIOnEventMode", 1) $GUI = GUICreate("GUI", 250, 300) GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit") $bBm = "Button" & @CRLF & "One" $Button = GUICtrlCreateLabel(@CRLF & $bBm, 160, 185, 85, 110, BitOR($SS_CENTER, $BS_VCENTER),$WS_EX_CLIENTEDGE) ;, $SS_CENTERIMAGE)) ; $BS_MULTILINE, $BS_CENTER, $BS_VCENTER, $WS_EX_WINDOWEDGE)) GUICtrlSetBkColor(-1, 0xFFFFFF) GUICtrlSetFont($Button, 14, 800, 0, "MV Boli", 5) GUICtrlSetColor($Button, 0xFF0000) GUICtrlSetOnEvent($Button, "_Exit") GUISetState() While 1 Sleep(100) WEnd Func _Exit() Exit EndFunc ;==>_Exit _WinAPI_DrawText
  12. This works for me. #include <Constants.au3> #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <ColorConstantS.au3> #include <FontConstants.au3> #include "ColorConstants.au3" Opt("GUIOnEventMode", 1) $GUI = GUICreate("GUI", 250, 300) GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit") $Button = GUICtrlCreateButton("Button" & @CRLF & "One", 160, 185, 85, 110, BitOR($SS_CENTER, $SS_CENTERIMAGE)) ; $BS_MULTILINE, $BS_CENTER, $BS_VCENTER, $WS_EX_WINDOWEDGE)) GUICtrlSetBkColor(-1, 0xFFFFFF) GUICtrlSetFont($Button, 14, 800, 0, "MV Boli", 5) GUICtrlSetColor($Button, 0xFF0000) GUICtrlSetOnEvent($Button, "_Exit") GUISetState() While 1 Sleep(100) WEnd Func _Exit() Exit EndFunc ;==>_Exit
  13. I did also. McAffe quarantined it. I just turned off the live scan and turned off the internet then re installed. then reactivated McAffe and excluded the file in real time scan. I just trust Autoit to not do anything like that.
  14. @JohnOne I like that. Centered text in label ;~ Name: JohnOne ;~ URL: https://www.autoitscript.com/forum/topic/173672-change-the-size-of-the-gui-title-bar/#comment-1257450 #include <WindowsConstants.au3> #include <WindowsConstants.au3> #include <StaticConstants.au3> ;~ Local $GUI_WS_EX_PARENTDRAG GUICreate("GUI", 200, 200, 100, 100, 0x80880000) ; 0x80880000 = $WS_POPUPWINDOW $TitleBar = GUICtrlCreateLabel("Title Bar", 0, 0, 160, 40,BitOR($SS_CENTER,$SS_CENTERIMAGE),0x00100000) ;$GUI_WS_EX_PARENTDRAG) ; 0x00100000 = $GUI_WS_EX_PARENTDRAG , -1 GUICtrlSetBkColor(-1, 0x0000FF) GUICtrlSetColor(-1, 0xFFFFFF) $Close = GUICtrlCreateButton("X", 160, 0, 40, 40,$WS_EX_TRANSPARENT) GUICtrlSetBkColor(-1, 0xFF0000) GUICtrlSetColor(-1, 0xFFFFFF) GUICtrlSetFont($TitleBar,10,600) GUISetState(@SW_SHOW) While 3 Switch GUIGetMsg() Case -3 Exit Case $Close Exit EndSwitch WEnd
  15. If the items exist then why not use _GUICtrlListView_SetItem ?
×
×
  • Create New...