HTTPRequest + HTTP_SSL=1 not working?

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
User avatar
Grovkillen
Automation Wizard
Posts: 300
Joined: Fri Aug 10, 2012 2:38 pm
Location: Hudiksvall, Sweden
Contact:

HTTPRequest + HTTP_SSL=1 not working?

Post by Grovkillen » Wed Jan 02, 2019 10:41 am

Code: Select all

Let>HTTP_SSL=1
//Let>TLS_VER=1
HTTPRequest>https://www.vecka.nu/,,GET,,VECKA_NU,,,,


HTTPRequest>https://www.google.com/,,GET,,GOOGLE_COM,,,,

**BREAKPOINT**
Google will give me a response but not vecka.nu (and other https pages). I will only receive the 400 error.
Let>ME=%Script%

Running: MS14.5.4

User avatar
Grovkillen
Automation Wizard
Posts: 300
Joined: Fri Aug 10, 2012 2:38 pm
Location: Hudiksvall, Sweden
Contact:

Re: HTTPRequest + HTTP_SSL=1 not working?

Post by Grovkillen » Wed Jan 02, 2019 11:27 am

As a workaround I use IECreate and IENavigate. But I wouldn't mind if the IECreate could have a flag for starting as hidden. The following code will make the IE window show for an instance, feels a bit flaky for end users.

Code: Select all

  IECreate>IE[0]
  IEShowIE>IE[0],0
Let>ME=%Script%

Running: MS14.5.4

User avatar
Marcus Tettmar
Site Admin
Posts: 7046
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: HTTPRequest + HTTP_SSL=1 not working?

Post by Marcus Tettmar » Wed Jan 02, 2019 1:16 pm

Regarding the HTTPRequest SSL issue, we have identified a bug and working on a fix right now.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
Grovkillen
Automation Wizard
Posts: 300
Joined: Fri Aug 10, 2012 2:38 pm
Location: Hudiksvall, Sweden
Contact:

Re: HTTPRequest + HTTP_SSL=1 not working?

Post by Grovkillen » Wed Jan 02, 2019 1:25 pm

Marcus Tettmar wrote:
Wed Jan 02, 2019 1:16 pm
Regarding the HTTPRequest SSL issue, we have identified a bug and working on a fix right now.
Thank you for a quick response.
Let>ME=%Script%

Running: MS14.5.4

User avatar
Marcus Tettmar
Site Admin
Posts: 7046
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: HTTPRequest + HTTP_SSL=1 not working?

Post by Marcus Tettmar » Wed Jan 02, 2019 7:28 pm

Macro Scheduler 14.5.4 is now available with the fix.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
Grovkillen
Automation Wizard
Posts: 300
Joined: Fri Aug 10, 2012 2:38 pm
Location: Hudiksvall, Sweden
Contact:

Re: HTTPRequest + HTTP_SSL=1 not working?

Post by Grovkillen » Wed Jan 02, 2019 7:49 pm

Fast fix! I will test tomorrow.
Let>ME=%Script%

Running: MS14.5.4

User avatar
Marcus Tettmar
Site Admin
Posts: 7046
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: HTTPRequest + HTTP_SSL=1 not working?

Post by Marcus Tettmar » Wed Jan 02, 2019 8:04 pm

And you don't need to explicitly set SSL or TLS versions. This works fine on it's own:

HTTPRequest>https://www.vecka.nu/,,GET,,VECKA_NU
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
JRL
Automation Wizard
Posts: 3233
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Re: HTTPRequest + HTTP_SSL=1 not working?

Post by JRL » Wed Jan 02, 2019 8:42 pm

Grovkillen wrote:The following code will make the IE window show for an instance, feels a bit flaky for end users.
Something like this can mask the window flicker.

Code: Select all

DeleteFile>%temp_dir%3SecondScreenMask.scp
LabelToVar>TemporaryScript,vData
WriteLn>%temp_dir%3SecondScreenMask.scp,wres,vData
ExecuteFile>%temp_dir%3SecondScreenMask.scp

/*
TemporaryScript:
Let>SCREENCAP_CLIPBOARD=0
Let>kk=0
GetCursorPos>CurX,CurY
MouseMove>-1000000,-1000000
GetCursorPos>Xmin,Ymin
MouseMove>1000000,1000000
GetCursorPos>Xres,Yres
MouseMove>CurX,CurY
Add>Xres,1
Add>Yres,1
ScreenCapture>Xmin,Ymin,Xres,Yres,%temp_dir%screen.bmp
Dialog>Dialog1
object Dialog1: TForm
  AutoSize = True
  BorderIcons = [biSystemMenu]
  BorderStyle = bsNone
  FormStyle = fsStayOnTop
  object MSImage1: tMSImage
    AutoSize = True
  end
end
EndDialog>Dialog1
SetDialogProperty>Dialog1,msImage1,LoadImage,%temp_dir%Screen.bmp
Let>WIN_USEHANDLE=1
  MoveWindow>Dialog1.handle,-32000,-32000
  ResizeWindow>Dialog1.handle,0,0
Let>WIN_USEHANDLE=0
Show>Dialog1
Label>Loop
Let>WIN_USEHANDLE=1
  MoveWindow>Dialog1.handle,vLeft,vTop
  ResizeWindow>Dialog1.handle,0,0
Let>WIN_USEHANDLE=0
Timer>vTime
If>vTime>3000
  Exit>0
EndIf
Goto>Loop
*/

Wait>1
  IECreate>IE[0]
  IEShowIE>IE[0],0
  Wait>3

//Delete temporary files
DeleteFile>%temp_dir%3SecondScreenMask.scp
DeleteFile>%temp_dir%Screen.bmp

//View IE session to be able to close it
IEShowIE>IE[0],1

User avatar
Grovkillen
Automation Wizard
Posts: 300
Joined: Fri Aug 10, 2012 2:38 pm
Location: Hudiksvall, Sweden
Contact:

Re: HTTPRequest + HTTP_SSL=1 not working?

Post by Grovkillen » Thu Jan 03, 2019 7:43 am

Thanks for the update. It is working just great! :)
Let>ME=%Script%

Running: MS14.5.4

User avatar
Grovkillen
Automation Wizard
Posts: 300
Joined: Fri Aug 10, 2012 2:38 pm
Location: Hudiksvall, Sweden
Contact:

Re: HTTPRequest + HTTP_SSL=1 not working?

Post by Grovkillen » Thu Jan 03, 2019 7:44 am

JRL wrote:
Wed Jan 02, 2019 8:42 pm
Grovkillen wrote:The following code will make the IE window show for an instance, feels a bit flaky for end users.
Something like this can mask the window flicker.

Code: Select all

DeleteFile>%temp_dir%3SecondScreenMask.scp
LabelToVar>TemporaryScript,vData
WriteLn>%temp_dir%3SecondScreenMask.scp,wres,vData
ExecuteFile>%temp_dir%3SecondScreenMask.scp

/*
TemporaryScript:
Let>SCREENCAP_CLIPBOARD=0
Let>kk=0
GetCursorPos>CurX,CurY
MouseMove>-1000000,-1000000
GetCursorPos>Xmin,Ymin
MouseMove>1000000,1000000
GetCursorPos>Xres,Yres
MouseMove>CurX,CurY
Add>Xres,1
Add>Yres,1
ScreenCapture>Xmin,Ymin,Xres,Yres,%temp_dir%screen.bmp
Dialog>Dialog1
object Dialog1: TForm
  AutoSize = True
  BorderIcons = [biSystemMenu]
  BorderStyle = bsNone
  FormStyle = fsStayOnTop
  object MSImage1: tMSImage
    AutoSize = True
  end
end
EndDialog>Dialog1
SetDialogProperty>Dialog1,msImage1,LoadImage,%temp_dir%Screen.bmp
Let>WIN_USEHANDLE=1
  MoveWindow>Dialog1.handle,-32000,-32000
  ResizeWindow>Dialog1.handle,0,0
Let>WIN_USEHANDLE=0
Show>Dialog1
Label>Loop
Let>WIN_USEHANDLE=1
  MoveWindow>Dialog1.handle,vLeft,vTop
  ResizeWindow>Dialog1.handle,0,0
Let>WIN_USEHANDLE=0
Timer>vTime
If>vTime>3000
  Exit>0
EndIf
Goto>Loop
*/

Wait>1
  IECreate>IE[0]
  IEShowIE>IE[0],0
  Wait>3

//Delete temporary files
DeleteFile>%temp_dir%3SecondScreenMask.scp
DeleteFile>%temp_dir%Screen.bmp

//View IE session to be able to close it
IEShowIE>IE[0],1
Thanks for that, a huge workaround but still a workaround ;)
Let>ME=%Script%

Running: MS14.5.4

Post Reply