Jump to content

Golabius

Members
  • Posts

    10
  • Joined

  • Last visited

Golabius's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. @Beege, Tnx man. Clear. but can EditBox does it like RichEdit?(Drag&Drop Link or Text)
  2. how can create a EditBox that Making it possible to Drag&Drop link(or text) from web Control into it?(IE or others.) my sample code can drag&drop filePath to editBox but i want drag&Drop link(or text) into it. My Sample Code: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $frm_main = GUICreate("Drag(Test)", 405, 294, -1,-1,-1,$WS_EX_ACCEPTFILES) $ed_test = GUICtrlCreateEdit("", 1, 0, 403, 293) GUICtrlSetState(-1,$GUI_DROPACCEPTED) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd (sorry for my bad eng.)
  3. how can i active ActiveX in IE Control? i want use activex in java script & then load html file in IE Control in my program but i dont know how can i do it. (run autoit code in javascript and i just run Au3Code in IE Control in my program not in IE Windows(Not Separate Windows) ) My Au3Code: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <IE.au3> $oIE = _IECreateEmbedded() $form_main = GUICreate("AI in JS", 483, 385, 302, 218) $ctrl_ie = GUICtrlCreateObj($oIE, 0, 0, 482, 384) GUISetState(@SW_SHOW) _IENavigate($oIE,@ScriptDir&"\Test.htm") While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd & Test.htm Code: <html> <head></head> <body> <script language="javascript" type="text/javascript"> var oAutoIt = new ActiveXObject("AutoItX3.Control"); oAutoIt.Run("notepad.exe"); oAutoIt.MsgBox(0,"","HelloWorld!"); </script> </body> </html>
  4. Melba23,tnx. i think, this is the best way for create what i want, very tnx. this is my simple code with comboBox(simple style) But still Melba23's way is better and more complete. #include <GuiComboBoxEx.au3> #include <GuiImageList.au3> #include <GuiConstantsEx.au3> #include <WindowsConstants.au3> $iY=20 _Main() Func _Main() Global $hGUI, $hImage, $hCombo ; Create GUI $hGUI = GUICreate("ComboBox", 400, 300) $hCombo = GUICtrlCreateCombo ("", 2, 2, 394, $iY , BitOR($CBS_SIMPLE, $WS_VSCROLL, $WS_BORDER)) GUICtrlSetData(-1, "B1|B2|B3|B4|B5") GUISetState() GUIRegisterMsg($WM_COMMAND, "WM_COMMAND") Do Until GUIGetMsg() = $GUI_EVENT_CLOSE EndFunc ;==>_Main Func WM_COMMAND($hWnd, $iMsg, $iwParam, $ilParam) #forceref $hWnd, $iMsg Local $hWndFrom, $iIDFrom, $iCode, $hWndCombo If Not IsHWnd($hCombo) Then $hWndCombo = GUICtrlGetHandle($hCombo) $hWndFrom = $ilParam $iIDFrom = BitAND($iwParam, 0xFFFF) $iCode = BitShift($iwParam, 16) Switch $hWndFrom Case $hCombo, $hWndCombo Switch $iCode Case $CBN_EDITCHANGE ; Sent after the user has taken an action that may have altered the text in the edit control portion of a combo box $combo_text = _GUICtrlComboBox_GetEditText($hCombo) If (Not StringIsSpace($combo_text)) And $combo_text<>"" Then iCombo_Resize(1) Else iCombo_Resize(0) EndIf ; no return value EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==> Func iCombo_Resize($flag) ; Flag=1(Show List), else flag(Hide List) $iY =20 If $flag=1 Then $count = _GUICtrlComboBox_GetCount($hCombo) For $i=1 to $count $iY +=15 Next EndIf GUICtrlSetPos($hCombo,2, 2, 394, $iY) EndFunc
  5. Melba23, tnx again and can u help me about controls Z-Index(depth) for create button on listBox(EditBox)? Simple Code:(Button Doesn't work) #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $Form = GUICreate("Form", 413, 298, 229, 156) $Edit = GUICtrlCreateEdit("", 2, 2, 307, 193) $Button = GUICtrlCreateButton("Button", 204, 138, 75, 25) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd My COde:(i Dont want like it,DISABLE & ENABLE) #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $over = 0 $Form = GUICreate("Form", 413, 298, 229, 156) $Edit = GUICtrlCreateEdit("", 2, 2, 307, 193) $Button = GUICtrlCreateButton("Button", 204, 138, 75, 25) GUISetState(@SW_SHOW) While 1 $info = GUIGetCursorInfo() if not @error Then If ($info[4]=$Button) Then If ($over = 0) Then $over = 1 GUICtrlSetState($Edit,$GUI_DISABLE) EndIf Else If $over = 1 Then $over = 0 GUICtrlSetState($Edit,$GUI_ENABLE) EndIf EndIf EndIf $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd
  6. Melba23, very nice & very tnx but: i have some button under this list box and ...i dont want DISABLE and ENABLE listbox(button) for work button(listbox) or help me in Z-Index(depth) for create button on list box. i can create it with do resize comboBox in simple style but im looking a way for hide dropdown button just. its possible?
  7. Syed23, tnx but i dont want it. see this fake picture: i want create autocomplete with combobox and without dropdown button. (i dont want combin TextBox + ListBox For it.) and i dont want like it: #include <GuiComboBoxEx.au3> #include <GuiImageList.au3> #include <GuiConstantsEx.au3> #include <WindowsConstants.au3> Opt('MustDeclareVars', 1) $Debug_CB = False ; Check ClassName being passed to ComboBox/ComboBoxEx functions, set to True and use a handle to another control to see it work _Main() Func _Main() Local $hGUI, $hImage, $hCombo ; Create GUI $hGUI = GUICreate("ComboBoxEx Reset Content", 400, 300) $hCombo = _GUICtrlComboBoxEx_Create ($hGUI, "", 2, 2, 394, 100, BitOR($CBS_SIMPLE, $WS_VSCROLL, $WS_BORDER)) GUISetState() _GUICtrlComboBoxEx_BeginUpdate ($hCombo) For $x = 0 To 149 _GUICtrlComboBoxEx_AddString ($hCombo, StringFormat("%03d : Random string", Random(1, 100, 1)), Random(0, 8, 1), Random(0, 8, 1), Random(0, 8, 1)) Next _GUICtrlComboBoxEx_EndUpdate ($hCombo) Do Until GUIGetMsg() = $GUI_EVENT_CLOSE EndFunc ;==>_Main i just want hide comboBox dropdown button.
  8. try it: $ary = StringRegExp($sHTML,'<a href="/watch\?v=.*?" >(.*?)</a>',3) for $i = 0 to UBound($ary) - 1 msgbox(0, "RegExp", $ary[$i]) Next
  9. pls help me! how can i create comboBox without dropdown button?(and need dropdown list after type anything but dont need dropdown button.) #include <ComboConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $Form = GUICreate("comboBox without dropdown button", 413, 298) $Combo1 = GUICtrlCreateCombo("", 136, 98, 145, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL)) GUICtrlSetData(-1, "s1|s2|s3|s4|s5|s6", "s1") GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd
×
×
  • Create New...