Jump to content

Recommended Posts

Hay guys

Just had an idea and wanted to know where to start. I want to download a screenshot of a website automatically into a .png .jpg ect format so I can then set it as my desktop background.

This might be for for news: When the latest news is added to a website a screenshot of that website is saved and added to my desktop background.

I have tried using website that already do the screenshot but you have to open the website and click the button for it to generate one and thus InetGet does not help.

Any Ideas?

Link to post
Share on other sites

Maybe you can take a look at : 

ScreenCapture.au3 

_ScreenCapture_Capture

You capture what you need. 

You update your registry. 

Then you refresh your explorer.exe

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Link to post
Share on other sites

@caramen That would work but would involve opening the website, while this could be automatic it would be cool to be able to do it without having anything physically open. I had thought about using a website downloader but again they have tocbe opened to work (the ones I know about).

 

This very well might not be possible.

Link to post
Share on other sites

Can be done with webDriver only if the website itself got a screencapture function

You can't capture an image that is not existing.

You can if you want get some text from the website. If that enouth for you. I mean in silent mode.

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Link to post
Share on other sites

I am false ?

Becose the OP said : 

14 hours ago, kingjacob90 said:

without having anything physically open.

So basically i answer to this... But if i am false feel free to correct me :/ We are all.  I am here for learn :) . How whould you record an non opened windows i am listening to you.

Becose as you can see in my sig i am the one promoting your UDF. It is so great... 

Edited by caramen

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Link to post
Share on other sites
3 minutes ago, kingjacob90 said:

Thanks @Danp2 and @caramen for your input. I will definitely have a look at the webDriver UDF; it also sounds really good for other things I have in mind :)

Thanks again,

Jacob

This udf is so powerfull. the only thing i dont like but that we cannot bypass is the chromedriver.exe it have to be one each computer that will run the script. But this is not from the UDF. It is from chrome. 

Edited by caramen

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Link to post
Share on other sites

@caramen It is possible to use the _IE functions to operate on a non-visible IE object. The same is true with the Web driver. I hinted at that in my earlier post when I mentioned "headless" mode.

This statement is wrong --

18 hours ago, caramen said:

Can be done with webDriver only if the website itself got a screencapture function

You can't capture an image that is not existing.

The Webdriver specs support taking a screen shot. You can read more about it here.

:)

Link to post
Share on other sites

You helped me a lot :) But :P 

Same as this post : 

On 21/11/2018 at 2:42 PM, caramen said:

I am sorry but no for me there is a difference between erase the line and erase the string. The line is still here

I dont wanna play with words but... Becose I have bad in english. I will say with that quote, you know what i mean :P;) .

Edited by caramen

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Link to post
Share on other sites
25 minutes ago, Danp2 said:

Actually, I don't. Feel free to clarify. ;)

Dont call a cat like a dog :) 

An "non opened window" is not same as an "existing hidden window" That's all. Particulary when ppl are learning. Precise baths must be used.

 

In my quote careca was thinking about an obvius reaction. But not it was a file modification (Help file ) forgetten by the autoIT team. 

 

If the words i used was corectly understood. It was not an obvius reaction but a bug, or maybe "depend from where you see the problem" a forgetten reaction in the help file.

 

In France i know we're not in France here :P the words are very importante. I was taken on the baths that I used several times on the forum that's why I said all this. 

1 hour ago, Danp2 said:

This statement is wrong --

So i dont agree with this. :) 

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Link to post
Share on other sites

B)

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Link to post
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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By ioa747
      SmartNote is a screen snip tool to take Screenshot with OCR ability from Tesseract 100+ languages
      Of course you will have to install it first. https://github.com/UB-Mannheim/tesseract/wiki
      I tried it with the version of 32bit tesseract-ocr-w32-setup-v5.2.0.20220712.exe
      in Windows 10 Pro 64-bit 21H2
       
      as default with ALT_key and Left_mouse_button snipe the note
       
      #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=mmcndmgr-106.ico #AutoIt3Wrapper_Outfile=SmartNote.exe #AutoIt3Wrapper_Res_Description=SmartNote screen snip & Tesserac ocr #AutoIt3Wrapper_Res_Fileversion=1.0.0.3 #AutoIt3Wrapper_Res_Fileversion_AutoIncrement=y #AutoIt3Wrapper_Res_ProductName=SmartNote.au3 #AutoIt3Wrapper_Res_ProductVersion=1.0.0.0 #AutoIt3Wrapper_Res_CompanyName=ioa747 #AutoIt3Wrapper_Res_LegalCopyright=Free with regards of AutoIT forum #AutoIt3Wrapper_Run_Tidy=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** ;~ ScriptName=SmartNote.au3 #include <MsgBoxConstants.au3> #include <ScreenCapture.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <StaticConstants.au3> #include <TrayConstants.au3> #include <Misc.au3> #include <Array.au3> ;tray entry to exit script Opt("TrayMenuMode", 3) ;0=append, 1=no default menu, 2=no automatic check, 4=menuitemID not return Opt("TrayOnEventMode", 1) ; Enable TrayOnEventMode. TrayCreateItem("Exit") TrayItemSetOnEvent(-1, "ExitScript") TraySetIcon("mmcndmgr.dll", -106) Local $mPos, $gPos[4], $Active_title, $ghost_gui, $block_gui, $Active_hWnd ;~ array to hold the Contextmenu data Local $NoteGui[1][10] $NoteGui[0][0] = 0 ; Note_Handle cnt $NoteGui[0][1] = "jpgPath" $NoteGui[0][2] = "ID_PicCtrl" $NoteGui[0][3] = "ID_ContextMenu" $NoteGui[0][4] = "ID_cMenuCopy" $NoteGui[0][5] = "ID_cMenuSave" $NoteGui[0][6] = "ID_cMenuOpen" $NoteGui[0][7] = "ID_cMenuOCR-eng" $NoteGui[0][8] = "ID_cMenuOCR-eng+ell" $NoteGui[0][9] = "ID_cMenuClose" ;~ HotKeySet("{PGUP}", "NoteGui_display") ;<|<|<|<|<|<|<|<|<| contex array info ; make ghost gui $ghost_gui = GUICreate("ghost_gui", 100, 100, 1, 1, $WS_POPUP, BitOR($WS_EX_TOOLWINDOW, $WS_EX_TOPMOST)) GUISetBkColor("0xFFFF00") ; $COLOR_YELLOW WinSetTrans($ghost_gui, "", 50) ; make mouse block gui $block_gui = GUICreate("ghost_gui", 100, 100, 1, 1, $WS_POPUP, BitOR($WS_EX_TOOLWINDOW, $WS_EX_TOPMOST)) WinSetTrans($block_gui, "", 1) ; Check for leftover files Local $iFileExists = FileExists(@ScriptDir & "\tmp") If $iFileExists Then FileDelete(@ScriptDir & "\tmp\*.*") Else DirCreate(@ScriptDir & "\tmp") EndIf ; loop until program exit ;********************************************************************************************* While 1 $Active_title = WinGetTitle("[ACTIVE]") $Active_hWnd = WinGetHandle($Active_title) ; whait ALT_key and Left_mouse_button _IsPressed If _IsPressed("12") And _IsPressed("01") Then ; for create new note $mPos = MouseGetPos() $gPos[0] = $mPos[0] $gPos[1] = $mPos[1] ; Wait until key is released. While _IsPressed("01") Sleep(250) $mPos = MouseGetPos() $gPos[2] = $mPos[0] $gPos[3] = $mPos[1] ; show ghost gui GUISetState(@SW_SHOW, $ghost_gui) WinMove($ghost_gui, "", $gPos[0], $gPos[1], $gPos[2] - $gPos[0], $gPos[3] - $gPos[1]) ; show ghost gui GUISetState(@SW_SHOW, $block_gui) WinMove($block_gui, "", $mPos[0] - 50, $mPos[1] - 50) WEnd GUISetState(@SW_HIDE, $ghost_gui) GUISetState(@SW_HIDE, $block_gui) CreateNew_NoteGui($gPos) ; create new note EndIf $Active_title = WinGetTitle("[ACTIVE]") $Active_hWnd = WinGetHandle($Active_title) $aMsg = GUIGetMsg() If $aMsg = 0 Or $aMsg = $GUI_EVENT_MOUSEMOVE Then ContinueLoop Switch $aMsg ; Copy to Clipboard Case 6, 17, 28, 39, 50, 61, 72, 83, 94, 105, 116, 127, 138, 149, 160, 171, 182, 193, 204, 215, 226, 237, 248, 259, 270, 281, 292, 303, 314, 325, 336, 347, 358 _PicToClip($Active_title) ; Save as... Case 7, 18, 29, 40, 51, 62, 73, 84, 95, 106, 117, 128, 139, 150, 161, 172, 183, 194, 205, 216, 227, 238, 249, 260, 271, 282, 293, 304, 315, 326, 337, 348, 359 SaveFileDlg() ; Open Case 8, 19, 30, 41, 52, 63, 74, 85, 96, 107, 118, 129, 140, 151, 162, 173, 184, 195, 206, 217, 228, 239, 250, 261, 272, 283, 294, 305, 316, 327, 338, 349, 360 ShellExecute($Active_title) ; OCR - eng Case 10, 21, 32, 43, 54, 65, 76, 87, 98, 109, 120, 131, 142, 153, 164, 175, 186, 197, 208, 219, 230, 241, 252, 263, 274, 285, 296, 307, 318, 329, 340, 351, 362 _Tesserac($Active_title, "eng") ; OCR - eng + ell Case 11, 22, 33, 44, 55, 66, 77, 88, 99, 110, 121, 132, 143, 154, 165, 176, 187, 198, 209, 220, 231, 242, 253, 264, 275, 286, 297, 308, 319, 330, 341, 352, 363 _Tesserac($Active_title, "eng+ell") ; Close Case 13, 24, 35, 46, 57, 68, 79, 90, 101, 112, 123, 134, 145, 156, 167, 178, 189, 200, 211, 222, 233, 244, 255, 266, 277, 288, 299, 310, 321, 332, 343, 354, 365 Local $strLen = StringLen(@ScriptDir & "\tmp\image_") If StringLeft($Active_title, $strLen) = @ScriptDir & "\tmp\image_" Then GUIDelete($Active_hWnd) FileDelete($Active_title) NoteGui_DeleteBy_cMenuClose($aMsg) ConsoleWrite("- WinClose " & $Active_hWnd & " & FileDelete " & $Active_title & @CRLF) EndIf EndSwitch WEnd ;********************************************************************************************* ;-------------------------------------------------------------------------------------------- Func ExitScript() ; exit program Exit EndFunc ;==>ExitScript ;-------------------------------------------------------------------------------------------- Func CreateNew_NoteGui($gPos) ; create new note gui ;~ ;$NoteGui[0][0] = Note_Handle ;~ ;$NoteGui[0][1] = jpgPath ;~ ;$NoteGui[0][2] = ID_PicCtrl ;~ ;$NoteGui[0][3] = ID_ContextMenu ;~ ;$NoteGui[0][4] = ID_cMenuClose ;~ ;$NoteGui[0][5] = ID_cMenuSave ;~ ;$NoteGui[0][6] = ID_ ;~ ;$NoteGui[0][7] = ID_ ;~ ;$NoteGui[0][8] = ID_ ;~ ;$NoteGui[0][9] = ID_ Local $n, $gW, $gH ReDim $NoteGui[UBound($NoteGui) + 1][10] $NoteGui[0][0] += 1 $n = $NoteGui[0][0] $gW = $gPos[2] - $gPos[0] $gH = $gPos[3] - $gPos[1] ; create note GUI $NoteGui[$n][0] = GUICreate($NoteGui[$n][1], $gW, $gH, $gPos[0], $gPos[1], $WS_POPUP, BitOR($WS_EX_TOOLWINDOW, $WS_EX_TOPMOST)) ; jpg Path for _ScreenCapture_Capture $NoteGui[$n][1] = @ScriptDir & "\tmp\image_" & $NoteGui[$n][0] & ".jpg" _ScreenCapture_Capture($NoteGui[$n][1], $gPos[0], $gPos[1], $gPos[2], $gPos[3]) ; set jpg Path as GUI title WinSetTitle($NoteGui[$n][0], "", $NoteGui[$n][1]) $NoteGui[$n][2] = GUICtrlCreatePic($NoteGui[$n][1], 0, 0, 0, 0, -1, $GUI_WS_EX_PARENTDRAG) GUICtrlCreateLabel("", 0, 0, $gW, $gH, $SS_GRAYFRAME) ;just for $SS_GRAYFRAME ; Creates a context menu $NoteGui[$n][3] = GUICtrlCreateContextMenu($NoteGui[$n][2]) ; MenuItem for the context menu $NoteGui[$n][4] = GUICtrlCreateMenuItem("Copy to Clipboard", $NoteGui[$n][3]) $NoteGui[$n][5] = GUICtrlCreateMenuItem("Save as...", $NoteGui[$n][3]) $NoteGui[$n][6] = GUICtrlCreateMenuItem("Open", $NoteGui[$n][3]) GUICtrlCreateMenuItem("", $NoteGui[$n][3]) ; separator $NoteGui[$n][7] = GUICtrlCreateMenuItem("OCR - eng", $NoteGui[$n][3]) $NoteGui[$n][8] = GUICtrlCreateMenuItem("OCR - eng+ell", $NoteGui[$n][3]) GUICtrlCreateMenuItem("", $NoteGui[$n][3]) ; separator $NoteGui[$n][9] = GUICtrlCreateMenuItem("Close", $NoteGui[$n][3]) ; Display the GUI. GUISetState(@SW_SHOW, $NoteGui[$n][0]) Return $NoteGui[$n][0] EndFunc ;==>CreateNew_NoteGui ;-------------------------------------------------------------------------------------------- Func SaveFileDlg() ; Save file Dialog ; Create a constant variable in Local scope of the message to display in FileSaveDialog. Local Const $sMessage = "Choose a filename." ; Display a save dialog to select a file. Local $sFileSaveDialog = FileSaveDialog($sMessage, @ScriptDir & "\SET\", "image (*.jpg)", $FD_PATHMUSTEXIST) If @error Then ; Display the error message. ;MsgBox($MB_SYSTEMMODAL, "", "No file was saved.") Else ; Retrieve the filename from the filepath e.g. Example.jpg Local $sFileName = StringTrimLeft($sFileSaveDialog, StringInStr($sFileSaveDialog, "\", $STR_NOCASESENSEBASIC, -1)) ; Check if the extension .jpg is appended to the end of the filename. Local $iExtension = StringInStr($sFileName, ".", $STR_NOCASESENSEBASIC) ; If a period (dot) is found then check whether or not the extension is equal to .jpg If $iExtension Then ; If the extension isn't equal to .jpg then append to the end of the filepath. If Not (StringTrimLeft($sFileName, $iExtension - 1) = ".jpg") Then $sFileSaveDialog &= ".jpg" Else ; If no period (dot) was found then append to the end of the file. $sFileSaveDialog &= ".jpg" EndIf ; Display the saved file. ConsoleWrite("You saved the following file:" & @CRLF & $sFileSaveDialog & @CRLF) FileCopy($Active_title, $sFileSaveDialog, $FC_OVERWRITE + $FC_CREATEPATH) EndIf EndFunc ;==>SaveFileDlg ;-------------------------------------------------------------------------------------------- Func NoteGui_display() _ArrayDisplay($NoteGui, "$NoteGui") EndFunc ;==>NoteGui_display ;-------------------------------------------------------------------------------------------- Func NoteGui_DeleteBy_cMenuClose($cMenuClose) ; NoteGui_DeleteBy_cMenuClose For $i = 1 To $NoteGui[0][0] If $cMenuClose = $NoteGui[$i][4] Then ExitLoop EndIf Next _ArrayDelete($NoteGui, $i) $NoteGui[0][0] -= 1 EndFunc ;==>NoteGui_DeleteBy_cMenuClose ;-------------------------------------------------------------------------------------------- Func _PicToClip($Path) ; use ms-paint to copy image to clipboard Local $aPos = WinGetPos("[ACTIVE]") ShellExecute(@WindowsDir & "\system32\mspaint.exe", $Path, "", "open", @SW_HIDE) Local $MsPaint $MsPaint = WinWait("[CLASS:MSPaintApp]") WinActivate($MsPaint) Send("^a") Send("^c") WinClose($MsPaint) EndFunc ;==>_PicToClip ;-------------------------------------------------------------------------------------------- Func _Tesserac($ImagePath, $lang) ; perform ocr ; thanks to JohnOne https://www.autoitscript.com/forum/topic/174483-tesseract-simple-example/ ; more info at https://tesseract-ocr.github.io/tessdoc/Command-Line-Usage.html#simplest-invocation-to-ocr-an-image Local $ResultTextPath, $OutPutPath, $TesseractExePath, $Result $ResultTextPath = @ScriptDir & "\Result" $OutPutPath = $ResultTextPath & ".txt" $TesseractExePath = "C:\Program Files (x86)\Tesseract-OCR\tesseract.exe" ShellExecuteWait($TesseractExePath, '"' & $ImagePath & '" "' & $ResultTextPath & '" -l ' & $lang & ' --psm 6', "", "", @SW_HIDE) ConsoleWrite($TesseractExePath & ' "' & $ImagePath & '" "' & $ResultTextPath & '" -l ' & $lang & ' --psm 6' & @CRLF) If @error Then Exit MsgBox($MB_OK + $MB_TOPMOST + $MB_ICONERROR, "Error", @error) EndIf $Result = FileRead($OutPutPath) MsgBox($MB_OK + $MB_TOPMOST, "OCR Result", $Result) ClipPut($Result) $mPos = MouseGetPos() ToolTip("The text was copied to the clipboard", $mPos[0] - 50, $mPos[1] - 20) Sleep(2000) ToolTip("") FileDelete($OutPutPath) EndFunc ;==>_Tesserac  
      the topic from
      was helpful for this. Thanks for sharing it
       
      I met some issues
      One is that I didn't find out how to put image to clipboard from file
      and I use the ms-paint for this
       
      and the other is with the context menu array
      I don't know if there is a more efficient way to handle it
      If anyone knows and wants it
       
      Please, leave your comments and experiences here.
    • By jiaojiaodubai
      I am happy to see that the latest version of AutoIt3 can already be searched, downloaded and installed in the Windows 10+built-in package manager (Winget). Therefore, we can automatically install AutoIt3 itself by writing Powershell scripts, which helps to quickly deploy the working environment of AutoIt3 on new machines.

      Now, although AutoIt3 can be found and installed in Winget, its dedicated editor, SciTE4AutoIt, does not support this. I submitted a package request for SciTE4AutoIt to the Winget development team on GitHub and provided a download link. Then its developer replied to me:
      In other words, Winget developers believe that our website prevents Winget from directly downloading the .exe file of SciTE4AutoIt.

      In fact, I don't know much about the technical details he said, but I think we can make some changes to make SciTE4AutoIt more accessible.
       
    • By t0nZ
      Hi to all, I was wondering how to do something like this powershell command:
      Get-NetConnectionProfile -InterfaceAlias "Ethernet" | Set-NetConnectionProfile -NetworkCategory Private -Confirm:$false -PassThru natively, or bypassing powershell, in AutoIt.
      My goal is to change the state of the current network connection from public to private and viceversa.
      And looking beyond, to enable/disable network discovery, network crypt properties, sharing options etc....
       
    • By Jahar
      I have an AutoIT script It monitors 2 websites for content that applys to me and the services that I provide. One site is : www.Freelancer.com The other: www.PeoplePerHour.com Both sites publish new jobs on their site hourly or so. My AutoIT app, will view those sites and present new jobs to me in a grid that pops up on my screen. Lately, the app has stopped showing me any jobs from PeoplePerHour.
       
      For freelancer.com,  Inetget is giving full html but for peopleperhour, now its not coming.
      Func _CheckPPH()
          Local Static $hTimer = 0
          Local Static $hDownload = 0
          Local $aTitlesandUrls = 0
          Local Static $sTempFile = ""
          If $hTimer = 0 Then $hTimer = TimerInit()
          If $hDownload = 0 Then
              $sTempFile = _WinAPI_GetTempFileName(@TempDir)
              ConsoleWrite("Checking PPH..." & @CRLF)
              ConsoleWrite(">Downloading..." & @CRLF)
      ;~         $hDownload = InetGet("http://www.peopleperhour.com/freelance-jobs", $sTempFile, $INET_FORCERELOAD, $INET_DOWNLOADBACKGROUND)
              $hDownload = InetGet("http://www.peopleperhour.com/freelance-jobs", $sTempFile, $INET_FORCERELOAD)
      ;~         Return 0
          EndIf
      ;~     Sleep(30)
      ;~     Local $isCompleted = InetGetInfo($hDownload, $INET_DOWNLOADCOMPLETE)
      ;~     Local $isError = InetGetInfo($hDownload, $INET_DOWNLOADERROR)
      ;~     Sleep(30)
      ;~     If TimerDiff($hTimer) > 3000 And $isError Then
      ;~         ConsoleWrite("!PPH Fail" & @CRLF)
      ;~         InetClose($hDownload)
      ;~         $hDownload = 0
      ;~         Return 0
      ;~     EndIf
      ;~     Sleep(30)
          Local $Show = 0
      ;~     If TimerDiff($hTimer) > 3000 And $isCompleted Then
          If $hDownload > 0 Then
              ConsoleWrite("+Downloaded..." & @CRLF)
              Local $sPPHHtml = FileRead($sTempFile)
              $aTitlesandUrls = _StringBetween($sPPHHtml, '"title">' & @LF, 'time>')
      ;~         _ArrayDisplay($aTitlesandUrls)
              Local $aPPH[0][4]
              Local $sTitle = ""
              Local $sUrl = ""
              Local $sID = ""
              Local $sDate = ""
              Local $iRet=0
              Sleep(30)
              For $i = 0 To UBound($aTitlesandUrls) - 1
                  $sTitle = _StringBetween($aTitlesandUrls[$i], '<a title="', '" class')
                  $sUrl = _StringBetween($aTitlesandUrls[$i], 'href="', '">')
                  $sDate = _GetDate($aTitlesandUrls[$i])
                  If IsArray($sTitle) And IsArray($sUrl) Then
                      $sID = _GetID($sUrl[0])
      ;~                 _ArrayAdd($aPPH, $sDate & "|" & $sTitle[0] & "|" & $sUrl[0] & "|" & $sID)
                      $iRet = _BuildPopupsPPH($sID, $sDate, "PPH: " & $sTitle[0], $sUrl[0])
                      If $iRet Then $Show+=1
                  EndIf
              Next
              Sleep(30)
      ;~         If $Show > 0 Then ShowLatestJobs()
      ;~         _ArrayDisplay($aPPH)
              FileDelete($sTempFile)
              InetClose($hDownload)
              $hDownload = 0
              $hTimer = 0
              Return $Show
          EndIf
          Sleep(30)
      EndFunc   ;==>_CheckPPH
    • By singh54
      Hello All,

      I am new to auto It  and coding. Have only tried few automated logging for different websites.  The login pages of the websites which I have worked on were having form name with input type as text and it seems straight forward to automate their login using "_IEFormElementSetValue".
      I have got a url, it does not have any form in the source page. On further analyzing I found that It does call some login page separately as below.
      function showLogin(arg) {
        Global.pollingDialogDoc = null;
        var fresh = jQuery.isValidString(arg) && "fresh" == arg ? !0 : !1, appFrame = $("#appFrame");
        if ($("#modalFrame").show(), $("iframe").hide(), fresh || !appFrame.attr('src').match("html/login.html")) appFrame.attr('src', baseURL + 'html/login.html'), 
        appFrame.on('load', function() {
          setTimeout(function() {
            $("#modalFrame").hide(), appFrame.show();
          }, 1);
        }); else try {
          window.frames.appFrame.updatePageFromIndex();
        } catch (e) {}
      }
      I can simply use "send" and "mouse click" Method to automate the login but that doesn't seems very reliable. Is there any separate way to fill the user ID and password to the respective fields by having reference by frames or something. 
      Appreciate if any one can point me to correct document or help in any way...!
×
×
  • Create New...