Jump to content

How to get rid of the load cursor when I try to get the source


nend
 Share

Recommended Posts

Hi,

Is it possible to use this peace of code without every 3 seconds changes the cursor(the load cursor).

I've try it also with initread but the same result.

I've try it to use WinHttp.au3 but get a error when I try to connect this page.

Anyone has a solution, I'm stuck

#include "Inet.au3"

AdlibRegister("_get_info", 3000)

Func _get_info()
_INetGetSource("http://82.201.100.10:8000/RD02_Nonstop40.xspf")
;more code
EndFunc

While 1
Sleep(20)
WEnd
Link to comment
Share on other sites

Thanks for the reply but I don't think this is the right way to do so.

This is a small peace of a much larger program whits user can install and then you got problems with user rights when you try to change the windows cursors.

There a similar topic:

I Found a Windows way:

Mouse properties -> Cursors -> Change "working in second plane" to "aero_arrow.cur"

Change "busy" to "aero_arrow.cur"

I tried replacing the cursors files "busy" by the default arrow. But there is no sufficient privileges.

(In C:WindowsCursors)

Edited by nend
Link to comment
Share on other sites

nend,

The URL in the code that you supplied fails so I changed the URL to a page that is fairly large to test the affect on the cursor. When I run the following code there is NO affect on my cursor (Win7 64 bit on HP Pavilion w/8 GB mem).

#include "Inet.au3"

AdlibRegister("_get_info", 3000)

Func _get_info()
_INetGetSource("http://www.scoresandodds.com")
if @error then ConsoleWrite('Inetgetsource failed' & @LF)
ConsoleWrite('Scraping source at ' & @hour & ':' & @min & ':' & @sec & @LF)
;more code
EndFunc

While 1
Sleep(86400000) ; sleep for a day...just to keep script alive, adlib runs every 3 secs
WEnd

Also, it is a good idea to check return values from any function or UDF calls.

kylomas

Forum Rules         Procedure for posting code

"I like pigs.  Dogs look up to us.  Cats look down on us.  Pigs treat us as equals."

- Sir Winston Churchill

Link to comment
Share on other sites

Look in my Profile for _InetGetOutOfProcess, which uses InetGet in a new process.

UDF List:

 
_AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

Hoi kylomas,

Thank for the reply,

The url works fine, mabey they block it for use outside holland.

Error checking is in the final program (this is just a example)

But when you run this script stil gets the load cursor (just put your cursor at your deskop and you will see every 3 seconds the load cursor for a small moment)

nend,

The URL in the code that you supplied fails so I changed the URL to a page that is fairly large to test the affect on the cursor. When I run the following code there is NO affect on my cursor (Win7 64 bit on HP Pavilion w/8 GB mem).

#include "Inet.au3"

AdlibRegister("_get_info", 3000)

Func _get_info()
_INetGetSource("http://www.scoresandodds.com")
if @error then ConsoleWrite('Inetgetsource failed' & @LF)
ConsoleWrite('Scraping source at ' & @hour & ':' & @min & ':' & @sec & @LF)
;more code
EndFunc

While 1
Sleep(86400000) ; sleep for a day...just to keep script alive, adlib runs every 3 secs
WEnd

Also, it is a good idea to check return values from any function or UDF calls.

kylomas

Edited by nend
Link to comment
Share on other sites

Hoi Guinness,

Thanks for the reply, but even when I use inetget in a process outside original program I stil get every 3 second the load cursor on the desktop.

Have you got any other ideas?

Look in my Profile for _InetGetOutOfProcess, which uses InetGet in a new process.

Link to comment
Share on other sites

Post a small reproducer using the function I provided above.

UDF List:

 
_AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

Hoi Guinness,

And here is the code I used.

I see the cursor changing when I hover the desktop.

AdlibRegister("_get_info", 3000)

Func _get_info()
ConsoleWrite(_InetGetOutOfProcess('http://82.201.100.10:8000/RD02_Nonstop40.xspf)', @ScriptDir & '\test.txt') & @CRLF)
;more code
EndFunc

While 1
Sleep(20)
WEnd

; Download a file by spawning a new AutoIt process.
Func _InetGetOutOfProcess($sURL, $sFilePath, $iOptions = 0)
Return RunWait('"' & @AutoItExe & '" /AutoIt3ExecuteLine ' & '"Exit InetGet(""' & $sURL & '"", ""' & $sFilePath & '"", ' & $iOptions & ', 0)"') > 0
EndFunc ;==>_InetGetOutOfProcess

Post a small reproducer using the function I provided above.

Edited by nend
Link to comment
Share on other sites

nend,

Please provide workable/runnable code in the future >>

If @Compiled = 0 Then Exit

AdlibRegister('_AdLibFunc', 3000)

Func _AdLibFunc()
    AdlibUnRegister('_AdLibFunc')
    MsgBox(4096, '', _InetGetOutOfProcess('http://82.201.100.10:8000/RD02_Nonstop40.xspf', @ScriptDir & '\Test.txt') & @CRLF)
    AdlibRegister('_AdLibFunc', 3000)
EndFunc   ;==>_AdLibFunc

While 1
    Sleep(20)
WEnd

; Download a file by spawning a new AutoIt process.
Func _InetGetOutOfProcess($sURL, $sFilePath, $iOptions = 0)
    Return RunWait('"' & @AutoItExe & '" /AutoIt3ExecuteLine ' & '"Exit InetGet(""' & $sURL & '"", ""' & $sFilePath & '"", ' & $iOptions & ', 0)"') > 0
EndFunc   ;==>_InetGetOutOfProcess

UDF List:

 
_AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

Hoi Guinness,

Sorry for the late reply, I had a internet problem en could not reply sooner.

Next time I will test the code much better.

But I tested the new code you've posted but still every 3 seconds a small moment I see the load cursor.

nend,

Please provide workable/runnable code in the future >>

If @Compiled = 0 Then Exit

AdlibRegister('_AdLibFunc', 3000)

Func _AdLibFunc()
    AdlibUnRegister('_AdLibFunc')
    MsgBox(4096, '', _InetGetOutOfProcess('http://82.201.100.10:8000/RD02_Nonstop40.xspf', @ScriptDir & '\Test.txt') & @CRLF)
    AdlibRegister('_AdLibFunc', 3000)
EndFunc ;==>_AdLibFunc

While 1
    Sleep(20)
WEnd

; Download a file by spawning a new AutoIt process.
Func _InetGetOutOfProcess($sURL, $sFilePath, $iOptions = 0)
    Return RunWait('"' & @AutoItExe & '" /AutoIt3ExecuteLine ' & '"Exit InetGet(""' & $sURL & '"", ""' & $sFilePath & '"", ' & $iOptions & ', 0)"') > 0
EndFunc ;==>_InetGetOutOfProcess

Link to comment
Share on other sites

Hoi Kylomas,

My intertnet connection is a 55mb internet connection (I think that will be fast enough)

My Windows is a 32 bit window 7

Pc is a small pc (not so fast) AMD E-350 1,60 GHz

This is for a much larger program where I'm working on for a long time and have more than 2000 users how is using it, so it has to work on almost ervery type of pc.

nend,

What is your runtime environment, computer, internet connection, etc?

kylomas

Edited by nend
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...