Jump to content

santoshM

Members
  • Posts

    12
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

santoshM's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. iam trying to call URLDownloadToFile function with callback currently callback is not firing this is my code plz help #include <AutoItConstants.au3> #include <MsgBoxConstants.au3> #include <GUIConstantsEx.au3> ; Create Stub ;$hStub = _DllCallBack ("_OnProgress", "Hwnd;ulong;ulong:str") Local $hHandle = DllCallbackRegister("_OnProgress", "int", "long;long;long;str") ; Script Start - Add your code below here Global Const $DOWNLOAD_URL_1 = "https://google.com" DownloadFile($DOWNLOAD_URL_1,"D:\abc.html") Func DownloadFile($url,$filename) DllCall("urlmon.dll", "long", "URLDownloadToFile", "ptr", "none", "str", $url, "str", $filename, "dword", 0, "Ptr", DllCallbackGetPtr($hHandle)) MsgBox($MB_SYSTEMMODAL, "", "download Complete " & @error) EndFunc ; Callback Procedure Func _OnProgress($ulProgress, $ulProgressMax,$ulStatusCode,$wszStatusText) MsgBox($MB_SYSTEMMODAL, "", "Success2") return 1 ; EndFunc ;==>_EnumWindowsProc DllCallbackFree($hHandle)
  2. Dear friends i am facing a problem , i have created a window in autoit some time it is moving with the mouse curser even if iam not clicking the window
  3. How can i exit from a procedure in auto Func test() if x=o then     return endif endFunc
  4. i want to disable mouse wheel here is my code #include "MouseOnEvent.au3" Global Const $MYBLUE = 0x0B0511 Dim $szDrive, $szDir, $szFName, $szExt Global $currentNavigation = $sTempFolder & "\intro2.html" Global $oIE = _IECreateEmbedded() Global $hGUI = GUICreate($applicationName, 940, 640, _ (@DesktopWidth - 940) / 2, (@DesktopHeight - 640) / 2, $WS_POPUP + $WS_CLIPCHILDREN + $WS_CLIPSIBLINGS) ;$WS_POPUP) GUICtrlSetBkColor(-1,$MYBLUE ) GUICtrlCreateObj($oIE, 0, 0, 940, 640) GUICtrlSetBkColor(-1,$MYBLUE ) GUICtrlSetStyle(-1, BitOR($WS_EX_TRANSPARENT,$WS_EX_LAYERED)) _IENavigate($oIE, $currentNavigation) _BlockMouseClicksInput(0) Func _BlockMouseClicksInput($iOpt=0) If $iOpt = 0 Then _MouseSetOnEvent($MOUSE_WHEELSCROLLDOWN_EVENT, "__DummyDown") _MouseSetOnEvent($MOUSE_WHEELSCROLLUP_EVENT, "__DummyUP") Else _MouseSetOnEvent($MOUSE_WHEELSCROLLUP_EVENT) _MouseSetOnEvent($MOUSE_WHEELSCROLLDOWN_EVENT) EndIf EndFunc ;==>_BlockMouseClicksInput Func __DummyDown() EndFunc Func __DummyUp() EndFunc
  5. this is my function to download file ; Download the file in the background with the selected option of 'force a reload from the remote site.'     Local $hDownload = InetGet($downloadPath, $sFilePath, $INET_FORCERELOAD, $INET_DOWNLOADBACKGROUND)     $totalFileSize = InetGetSize($downloadPath)     ;MsgBox($MB_SYSTEMMODAL, "", "Download : " & $sFilePath,250 )     ; Wait for the download to complete by monitoring when the 2nd index value of InetGetInfo returns True.    Local $a    Local $iMsg    local $alreadyDownloded =0     Do         ;Sleep(20)          $alreadyDownloded =  InetGetInfo($hDownload,  $INET_DOWNLOADREAD)          if $alreadyDownloded >0 then         ;MsgBox($MB_SYSTEMMODAL, "", " Already Download size: " & $alreadyDownloded )             local $successPercentage = ($alreadyDownloded/$totalFileSize) * 100         ;GUICtrlSetData($lbl_Message," Downloading " & Round($successPercentage) & "%" )           UpdateText(GetKeyValueFromINI("DOWNLOADING") & " " & Round($successPercentage) & "%",Round($successPercentage))          endif          $a = GUIGetCursorInfo()          $iMsg = GUIGetMsg()         if $iMsg = $GUI_EVENT_PRIMARYDOWN Then             If $a[0] >= 914 And $a[0] <= 924 And $a[1] >= 17 And $a[1] <=28  Then                ;MsgBox($MB_SYSTEMMODAL, "", "Clicked "  )              _Minimize()              EndIf           EndIf _SendMessage($hGUI, $WM_SYSCOMMAND, $SC_DRAGMOVE, 0)     Until InetGetInfo($hDownload, $INET_DOWNLOADCOMPLETE) currently iam try to run this function in thread and see that it make any difference
  6. actually iam downloading file from server in GUI application and i want user can move Application in this process with mouse , current it get stuck if user is downloading file
  7. how to make your code responsive if your application is doing some long running tasks
  8. Thanks for the reply
  9. i have a problem it is showing white border around form , i want to remove that border. here is my code, i also want my form should be movable by mouse ;Main logic start;;;;;;;;;;;;;;;;;;;;;;;;;; Global Const $MYBLUE = 0x0B0511 Dim $szDrive, $szDir, $szFName, $szExt Global $oIE = _IECreateEmbedded() Global $hGUI = GUICreate($applicationName, 940, 640, _ (@DesktopWidth - 940) / 2, (@DesktopHeight - 640) / 2, $WS_POPUP + $WS_CLIPCHILDREN + $WS_CLIPSIBLINGS) ;$WS_POPUP) GUICtrlSetBkColor(-1,$MYBLUE ) GUICtrlCreateObj($oIE, 0, 0, 940, 640) GUICtrlSetBkColor(-1,$MYBLUE ) GUICtrlSetStyle(-1, BitOR($WS_EX_TRANSPARENT,$WS_EX_LAYERED))
  10. in application i want to find that iam runing autoit application for code or for compiled exe how can i find it
  11. What is the header file of DllStructGetPtr function
×
×
  • Create New...