rajeshwaran
Active Members-
Posts
41 -
Joined
-
Last visited
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
rajeshwaran's Achievements
Seeker (1/7)
1
Reputation
-
Morrison reacted to a post in a topic:
_GUICtrlListView_GetSelectedColumn () is not working always returns -1
-
The truth is, "Most of the languages are not in use, because of their incapability" AutoIt also incapability to support Multithread. Based on my understanding, none of the other languages supports this kind of indirect multithread feature. Keep in mind, in future, if any other languages comes with multithread feature + AUTOIT feature then, AUTOIT ? .
-
Dear AutoIt Developers.. Please provide a support for Multithread. From this forum, I came to know this truth. Lot of people wants Multithread feature. Lot of people posted threads to simulate Multithread feature using ASM code & DLL features, nothing is effective and not straight forward (those who are excellent in ASM & DLL, they can do). Most of the languages supports Multithread, but why not AUTOIT ? again the answer is "AUTOIT is not thread safe". Anyway, the Multithread feature support is required for AUTOIT, otherwise AUTOIT ?.
-
How to scroll window area with Mouse Scroll wheel
rajeshwaran replied to rajeshwaran's topic in AutoIt GUI Help and Support
The code what I have posted, contains the whole script. -
I am using the Message Handler GUIRegisterMsg($WM_LBUTTONDOWN, "Mouse_LeftButton_Down") This handler "Mouse_LeftButton_Down" is called for me whenever the mouse is clicked on Window area. My understanding is, the same handler will be invoked when I press mouse left button on Listview, If I have not registerd the below messages. GUIRegisterMsg($WM_NOTIFY, "Window_NotifyHandler") GUIRegisterMsg($WM_COMMAND, "Window_EventHandler") Am I right ?
-
How to scroll window area with Mouse Scroll wheel
rajeshwaran replied to rajeshwaran's topic in AutoIt GUI Help and Support
Hi Melba, I am using DELL USB Mouse, my doubt is, for me it is working without listview control. How to solve this problem ? -
How to scroll window area with Mouse Scroll wheel
rajeshwaran replied to rajeshwaran's topic in AutoIt GUI Help and Support
Hi Melba, Thanks for your support. The script you have modified above is not scrolling for Mouse Wheel. I have used your GUIScrollbars_Ex UDF and your example posted already in the forum. They are working fine with Lables. I have just modified code to add a listview, after that scrolling is not happend. See in the below code, I have added a Listview, just remove the comment "#cs" "#ce" and try again, it is not scrolling. #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GuIScrollbars.au3> #include <ScrollBarConstants.au3> #include <SendMessage.au3> #include "GUIScrollbars_Ex.au3" Global $aSB_WindowInfo[1][8] $hGUI = GUICreate("Test", 400, 300) #cs $listview = GUICtrlCreateListView("col1 |col2|col3 ", 5, 5, 200, 150);,$LVS_SORTDESCENDING) For $x = 1 To 8 GUICtrlCreateListViewItem("item" & $x & "|col2|col3", $listview) Next #ce For $i = 1 To 20 For $j = 1 To 20 GUICtrlCreateLabel(($i - 1) * 20 + $j, 10 + 85 * ($i - 1), 200 + 30 * ($j - 1), 75, 25) Next Next ; Generate scrollbars _GUIScrollbars_Generate($hGUI, 85 * 19 + 75, 30 * 19 + 25) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd -
How to scroll window area with Mouse Scroll wheel
rajeshwaran replied to rajeshwaran's topic in AutoIt GUI Help and Support
After a long search I have found this link HERE!!!! Now the problem is, I have a listview, once the focus moved to ListView I cant able to scroll window. How to solve this problem ? -
I have added a vertical scroll bar to Window, I can able to scroll using mouse left button by pressing the thumbnail of the scroll bar. How to make scrolling using Keyboard (Up/Down/PageUp/PageDown) keys and Mouse scroll wheel. Below is my sample script #AutoIt3Wrapper_au3check_parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <StructureConstants.au3> #include <GUIScrollBars.au3> #include <ScrollBarConstants.au3> Opt("MustDeclareVars", 1) _Main() Func _Main() Local $nFileMenu, $nExititem, $GUIMsg, $hGUI, $h_cGUI, $h_cGUI2 Local $listview, $button $hGUI = GUICreate("ScrollBar Example", 400, 400, -1, -1, BitOR($WS_MINIMIZEBOX, $WS_CAPTION, $WS_POPUP, $WS_SYSMENU, $WS_SIZEBOX)) $nFileMenu = GUICtrlCreateMenu("File") $nExititem = GUICtrlCreateMenuItem("Exit", $nFileMenu) $listview = GUICtrlCreateListView("col1 |col2|col3 ", 10, 10, 200, 150);,$LVS_SORTDESCENDING) For $x = 1 To 8 GUICtrlCreateListViewItem("item" & $x & "|col2|col3", $listview) Next GUICtrlSetResizing($listview, $GUI_DOCKALL) GUISwitch($hGUI) GUIRegisterMsg($WM_SIZE, "WM_SIZE") GUIRegisterMsg($WM_VSCROLL, "WM_VSCROLL") GUIRegisterMsg($WM_HSCROLL, "WM_HSCROLL") GUISetState() _GUIScrollBars_Init($hGUI) _GUIScrollBars_Init($h_cGUI) While 1 $GUIMsg = GUIGetMsg() Switch $GUIMsg Case $GUI_EVENT_CLOSE, $nExititem ExitLoop EndSwitch WEnd Exit EndFunc ;==>_Main Func WM_SIZE($hWnd, $Msg, $wParam, $lParam) #forceref $Msg, $wParam Local $index = -1, $yChar, $xChar, $xClientMax, $xClient, $yClient, $ivMax For $x = 0 To UBound($aSB_WindowInfo) - 1 If $aSB_WindowInfo[$x][0] = $hWnd Then $index = $x $xClientMax = $aSB_WindowInfo[$index][1] $xChar = $aSB_WindowInfo[$index][2] $yChar = $aSB_WindowInfo[$index][3] $ivMax = $aSB_WindowInfo[$index][7] ExitLoop EndIf Next If $index = -1 Then Return 0 Local $tSCROLLINFO = DllStructCreate($tagSCROLLINFO) ; Retrieve the dimensions of the client area. $xClient = BitAND($lParam, 0x0000FFFF) $yClient = BitShift($lParam, 16) $aSB_WindowInfo[$index][4] = $xClient $aSB_WindowInfo[$index][5] = $yClient ; Set the vertical scrolling range and page size DllStructSetData($tSCROLLINFO, "fMask", BitOR($SIF_RANGE, $SIF_PAGE)) DllStructSetData($tSCROLLINFO, "nMin", 0) DllStructSetData($tSCROLLINFO, "nMax", $ivMax) DllStructSetData($tSCROLLINFO, "nPage", $yClient / $yChar) _GUIScrollBars_SetScrollInfo($hWnd, $SB_VERT, $tSCROLLINFO) ; Set the horizontal scrolling range and page size DllStructSetData($tSCROLLINFO, "fMask", BitOR($SIF_RANGE, $SIF_PAGE)) DllStructSetData($tSCROLLINFO, "nMin", 0) DllStructSetData($tSCROLLINFO, "nMax", 2 + $xClientMax / $xChar) DllStructSetData($tSCROLLINFO, "nPage", $xClient / $xChar) _GUIScrollBars_SetScrollInfo($hWnd, $SB_HORZ, $tSCROLLINFO) Return $GUI_RUNDEFMSG EndFunc ;==>WM_SIZE Func WM_HSCROLL($hWnd, $Msg, $wParam, $lParam) #forceref $Msg, $lParam Local $nScrollCode = BitAND($wParam, 0x0000FFFF) Local $index = -1, $xChar, $xPos Local $Min, $Max, $Page, $Pos, $TrackPos For $x = 0 To UBound($aSB_WindowInfo) - 1 If $aSB_WindowInfo[$x][0] = $hWnd Then $index = $x $xChar = $aSB_WindowInfo[$index][2] ExitLoop EndIf Next If $index = -1 Then Return 0 ;~ ; Get all the horizontal scroll bar information Local $tSCROLLINFO = _GUIScrollBars_GetScrollInfoEx($hWnd, $SB_HORZ) $Min = DllStructGetData($tSCROLLINFO, "nMin") $Max = DllStructGetData($tSCROLLINFO, "nMax") $Page = DllStructGetData($tSCROLLINFO, "nPage") ; Save the position for comparison later on $xPos = DllStructGetData($tSCROLLINFO, "nPos") $Pos = $xPos $TrackPos = DllStructGetData($tSCROLLINFO, "nTrackPos") #forceref $Min, $Max Switch $nScrollCode Case $SB_LINELEFT ; user clicked left arrow DllStructSetData($tSCROLLINFO, "nPos", $Pos - 1) Case $SB_LINERIGHT ; user clicked right arrow DllStructSetData($tSCROLLINFO, "nPos", $Pos + 1) Case $SB_PAGELEFT ; user clicked the scroll bar shaft left of the scroll box DllStructSetData($tSCROLLINFO, "nPos", $Pos - $Page) Case $SB_PAGERIGHT ; user clicked the scroll bar shaft right of the scroll box DllStructSetData($tSCROLLINFO, "nPos", $Pos + $Page) Case $SB_THUMBTRACK ; user dragged the scroll box DllStructSetData($tSCROLLINFO, "nPos", $TrackPos) EndSwitch ;~ // Set the position and then retrieve it. Due to adjustments ;~ // by Windows it may not be the same as the value set. DllStructSetData($tSCROLLINFO, "fMask", $SIF_POS) _GUIScrollBars_SetScrollInfo($hWnd, $SB_HORZ, $tSCROLLINFO) _GUIScrollBars_GetScrollInfo($hWnd, $SB_HORZ, $tSCROLLINFO) ;// If the position has changed, scroll the window and update it $Pos = DllStructGetData($tSCROLLINFO, "nPos") If ($Pos <> $xPos) Then _GUIScrollBars_ScrollWindow($hWnd, $xChar * ($xPos - $Pos), 0) Return $GUI_RUNDEFMSG EndFunc ;==>WM_HSCROLL Func WM_VSCROLL($hWnd, $Msg, $wParam, $lParam) #forceref $Msg, $wParam, $lParam Local $nScrollCode = BitAND($wParam, 0x0000FFFF) Local $index = -1, $yChar, $yPos Local $Min, $Max, $Page, $Pos, $TrackPos For $x = 0 To UBound($aSB_WindowInfo) - 1 If $aSB_WindowInfo[$x][0] = $hWnd Then $index = $x $yChar = $aSB_WindowInfo[$index][3] ExitLoop EndIf Next If $index = -1 Then Return 0 ; Get all the vertial scroll bar information Local $tSCROLLINFO = _GUIScrollBars_GetScrollInfoEx($hWnd, $SB_VERT) $Min = DllStructGetData($tSCROLLINFO, "nMin") $Max = DllStructGetData($tSCROLLINFO, "nMax") $Page = DllStructGetData($tSCROLLINFO, "nPage") ; Save the position for comparison later on $yPos = DllStructGetData($tSCROLLINFO, "nPos") $Pos = $yPos $TrackPos = DllStructGetData($tSCROLLINFO, "nTrackPos") Switch $nScrollCode Case $SB_TOP ; user clicked the HOME keyboard key DllStructSetData($tSCROLLINFO, "nPos", $Min) Case $SB_BOTTOM ; user clicked the END keyboard key DllStructSetData($tSCROLLINFO, "nPos", $Max) Case $SB_LINEUP ; user clicked the top arrow DllStructSetData($tSCROLLINFO, "nPos", $Pos - 1) Case $SB_LINEDOWN ; user clicked the bottom arrow DllStructSetData($tSCROLLINFO, "nPos", $Pos + 1) Case $SB_PAGEUP ; user clicked the scroll bar shaft above the scroll box DllStructSetData($tSCROLLINFO, "nPos", $Pos - $Page) Case $SB_PAGEDOWN ; user clicked the scroll bar shaft below the scroll box DllStructSetData($tSCROLLINFO, "nPos", $Pos + $Page) Case $SB_THUMBTRACK ; user dragged the scroll box DllStructSetData($tSCROLLINFO, "nPos", $TrackPos) EndSwitch ;~ // Set the position and then retrieve it. Due to adjustments ;~ // by Windows it may not be the same as the value set. DllStructSetData($tSCROLLINFO, "fMask", $SIF_POS) _GUIScrollBars_SetScrollInfo($hWnd, $SB_VERT, $tSCROLLINFO) _GUIScrollBars_GetScrollInfo($hWnd, $SB_VERT, $tSCROLLINFO) ;// If the position has changed, scroll the window and update it $Pos = DllStructGetData($tSCROLLINFO, "nPos") If ($Pos <> $yPos) Then _GUIScrollBars_ScrollWindow($hWnd, 0, $yChar * ($yPos - $Pos)) $yPos = $Pos EndIf Return $GUI_RUNDEFMSG EndFunc ;==>WM_VSCROLL
-
Hi I am currently editing AutoIt scripts through SciTE editor. However, Source Insight is the best editor for developers, but it does not supporting AutoIt, but it is possible to create a Source Insight configuration file for AutoIt script syntax/format. If some of you have alredy created the configuration file then, share it to all.
-
I have created a Window and Listview control (a lengthy listview) with 1366x768 resolution, now my listview (all) items and subitems are displaying without scroll bar. After I have changed my resolution to 1024x768 my Listview appears at the same X, Y position with scroll bar appeared, but I cant view all items and subitems, at one shot, I need to move scroll bar to view the hidden items. So, how to design (position) controls for a complete view in all resolutions.