Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/27/2022 in all areas

  1. A $ is missing, should be: $Array = _Excel_RangeRead($ExcelWorkBook, $Sheet, $ExcelWorkBook.Worksheets($Sheet).Usedrange.Columns("A:A"), 1)
    1 point
  2. Have you tried like this? Local $Sheet = "" Local $Array For i = 0 To UBound($SheetList) - 1     $Sheet = $SheetList[$i]     $Array = _Excel_RangeRead($ExcelWorkBook, $Sheet, $Sheet.Usedrange.Columns("A:A"), 1)     _ArrayDisplay($Array) Next
    1 point
  3. Nine

    Dropdown Menu Buttons

    Not exactly sure what is not working. Looks good to me. I do not know where you got this code, but it seems kind of oldish. No offense. Here a streamlined version : #include <GUIConstants.au3> #include <Constants.au3> #include <WinAPISysWin.au3> #include <GuiMenu.au3> #NoTrayIcon Opt("MustDeclareVars", True) Prin() Func Prin() Local $hGUI = GUICreate("Ingreso", 601, 201, IniRead("coord.ini", "Position", "X-Pos", 0), IniRead("coord.ini", "Position", "Y-Pos", 0)) GUISetBkColor(0xFFFFFF) GUICtrlSetFont(-1, 12, 800, 0, "Times New Roman") Local $Button2 = GUICtrlCreateButton("Ingreso", 24, 152, 161, 33) GUICtrlSetFont(-1, 12, 400, 2, "Times New Roman") GUICtrlSetCursor(-1, 0) Local $ingreDummy = GUICtrlCreateDummy() Local $ingreContext = GUICtrlCreateContextMenu($ingreDummy) Local $PP = GUICtrlCreateMenuItem("He", $ingreContext) Local $PT = GUICtrlCreateMenuItem("Hi", $ingreContext) Local $Button3 = GUICtrlCreateButton("Ingreso d", 216, 152, 161, 33) GUICtrlSetFont(-1, 12, 400, 2, "Times New Roman") GUICtrlSetCursor(-1, 0) Local $resulDummy = GUICtrlCreateDummy() Local $resulContext = GUICtrlCreateContextMenu($resulDummy) Local $RP = GUICtrlCreateMenuItem("lol", $resulContext) Local $RT = GUICtrlCreateMenuItem("Cool", $resulContext) Local $RA = GUICtrlCreateMenuItem("holl", $resulContext) Local $Button4 = GUICtrlCreateButton("Busqueda", 410, 152, 161, 33) GUICtrlSetFont(-1, 12, 400, 2, "Times New Roman") GUICtrlSetCursor(-1, 0) Local $busqueDummy = GUICtrlCreateDummy() Local $busqueContext = GUICtrlCreateContextMenu($busqueDummy) Local $BP = GUICtrlCreateMenuItem("cool", $busqueContext) Local $BT = GUICtrlCreateMenuItem("roll", $busqueContext) Local $BA = GUICtrlCreateMenuItem("jkl", $busqueContext) GUISetState() GUIRegisterMsg($WM_MOVE, WM_MOVE) Local $nMsg While True $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button2 ShowMenu($hGUI, $nMsg, $ingreContext) Case $PP ConsoleWrite("test" & @CRLF) Case $PT Case $Button3 ShowMenu($hGUI, $nMsg, $resulContext) Case $RP Case $RT Case $RA Case $Button4 ShowMenu($hGUI, $nMsg, $busqueContext) Case $BP Case $BT Case $BA EndSwitch WEnd EndFunc ;==>Prin Func ShowMenu($hWnd, $idCtrl, $idContext) Local $hMenu = GUICtrlGetHandle($idContext) Local $aPos = ControlGetPos($hWnd, "", $idCtrl) Local $tPoint = DllStructCreate($tagPOINT) $tPoint.X = $aPos[0] $tPoint.Y = $aPos[1] + $aPos[3] _WinAPI_ClientToScreen($hWnd, $tPoint) _GUICtrlMenu_TrackPopupMenu($hMenu, $hWnd, $tPoint.X, $tPoint.Y) EndFunc ;==>ShowMenu Func WM_MOVE($hWnd, $iMsg, $wParam, $lParam) Local $aPos = WinGetPos($hWnd) IniWrite("Coord.ini", "Position", "X-Pos", $aPos[0]) IniWrite("Coord.ini", "Position", "Y-Pos", $aPos[1]) Return $GUI_RUNDEFMSG EndFunc ;==>WM_MOVE
    1 point
  4. Your test serves no purpose since you perform the same action in both branches. I don't get what you mean with "Endfun". What does the console tell when you get that error? Also: tidy your scripts!
    1 point
  5. zWebSrv Control Panel a product of AutoIT zWebSrvCP allows custom everything, edit files on your own zWebSrvCP.ini. From changing icons, colors and fonts. Even turning the module on and off can be done through the INI file. Currently zWebSrv only supports Windows >= 7 Download Full Program: - x64 PHP 8.0.9 : https://www.mediafire.com/file/qqe2m18uzfwwpuj/zWebSrv_v2.3_PHP-8.0.9_x64_%28trong.live%29.7z/file - X64 PHP 7.4.22 : https://www.mediafire.com/file/uoaz9gae62qju22/zWebSrv_v2.3_PHP-7.4.22_x64_%28trong.live%29.7z/file - X86 PHP 7.4.22 : https://www.mediafire.com/file/6ha2beq9wrht0jj/zWebSrv_v2.3_PHP-7.4.22_x86_%28trong.live%29.7z/file - x86 PHP 5.6.40 : https://www.mediafire.com/file/ofi55likr5uzew6/zWebSrv_v2.3_PHP-5.6.40_x86_%28trong.live%29.7z/file Change log see ChangeLog file ! The password to extract is: trong.live Extract to drive C : If the path is different, click "Update Installation Path"
    1 point
  6. Belini, This is how I do it: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> ; Set resize mode for controls Opt("GUIResizeMode", $GUI_DOCKAUTO) Global $iGUIInitSize = 500 $hGUI = GUICreate("Test", $iGUIInitSize, 500, -1, -1, BitOR($WS_SIZEBOX, $WS_SYSMENU)) $cButton = GUICtrlCreateButton("Resizing text", 10, 10, 80, 30) $iLast_Control = GUICtrlCreateDummy() GUISetState() GUIRegisterMsg($WM_SIZE, "_WM_SIZE") While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func _WM_SIZE($hWnd, $iMsg, $wParam, $lParam) #forceref $iMsg, $wParam, $lParam If $hWnd = $hGUI Then ; Calculate required font size Local $aGUI_Size = WinGetClientSize($hGUI) $iFontSize = Int(2 * (.25 + (8 * $aGUI_Size[0] / $iGUIInitSize))) / 2 ; Reset font size for all controls on main GUI For $i = 0 To $iLast_Control GUICtrlSetFont($i, $iFontSize) Next EndIf EndFunc ;==>_WM_SIZE M23
    1 point
×
×
  • Create New...