Jump to content

Unterminated string - possible to solve?


Recommended Posts

I am also getting the "Unterminated string" error.

More specifically, for the line Local $idRdo2=ControlGetHandle$hDlgWnd"","[TEXT5 Hours Data]”

Below is the code. Can anyone please take a quick look? Much appreciated!

 

Local $title="[TITLE:Some Software V7.632;CLASS:#32770]"

WinActivate($title)

Local $hLoginWnd=WinWaitActive($title)

 

;Download Data Start

Sleep(500)

ControlClick$hLoginWnd,"","[CLASS:AfxWnd100;INSTANCE:12]"EndFunc

 

Func PopDownloadDlg()

;Find the Main Window Open the Dialog Box

Local $title="[CLASS:TdxW_MainFrame_Class]"

WinActivate($title)

Local $hMainWnd=WinWaitActive($title)

SendKeepActive($hMainWnd)

WinMove$hMainWnd,"",0,0,300,600)

 

;Click Datadownload

;Move to the Option

;Avoid using Mouse without Borders

ControlClick$hMainWnd""3000ControlClick$hMainWnd"""[CLASS:AfxWnd42;INSTANCE:9]";Go down 10 lines to find the corresponding data download command

Send({DOWN 10}{ENTER})

EndFunc Func SetCheckDownloadDlg()

 

;Click and Download

Local Stitle="[TITLE:Data Download;CLASS:#32770]"

WinActivate$titleLocal $hDlgWnd=WinWaitActive$title)

 

;Check the radio button on page one

Sleep500)

 

Local $idRdo2=ControlGetHandle$hDlgWnd"","[TEXT:5 Hours Data]”)

_GUICtrlButton_SetCheck($idRdo2)

 

 

;Activate All Tabs in Turn Check the radio buttons

Local $idTab=ControlGetHandle($hDlgWnd,","[CLASS:SysTabControl32;INSTANCE:1]"_GUICtrlTab_SetCurFocus($idTab,0_GUICtrITab_SetCurFocus($idTab,1_GUICtrlTab_SetCurFocus($idTab,2_GUICtrlTab_SetCurFocus($idTab,4_GUICtrlTab_SetCurFocus($idTab,5EndFunc

 

Func ClickDownloadDlg)

Local $title="[TITLE:Data Download;CLASS:#32770]"

WinActivate$titleLocal $hDlgWnd=WinWaitActive$title)

 

 

;Download Start

Sleep500ControlClick$hDlgWnd"","[TEXT:Download Start]"EndFunc

 

Func WaitDownloadDlg()

;Download Start

Sleep500Local $title="[TITLE:Data Download;CLASS:#32770]"

WinActivate$titleLocal $hDlgWnd=WinWaitActive$title)

 

Local $idtext="

Do Sleep(2000)

$idtext=ControlGetText($hDlgWnd,"","[CLASS:Static;INSTANCE:2]")

Until‘Download Completed’=$idtext

;Until‘Download Cancel’=$idtext

;Wait for Message that show Download Complete

EndFunc

 

 

Func ExitMain()

;Exit

Local $title="[TITLE:Data Download;CLASS:#32770]"

WinActivate$titleLocal $hDlgWnd=WinWaitActive$titleWinClose$hDlgWndControlClick(tatic;INSTANCE:2]")

Until‘Download Completed’=$idtext

;Until‘Download Cancel’=$idtext

;Wait till Download Completed

EndFunc

 

 

Func ExitMain()

;Need to Exit Dialog Box otherwise Software is Still On

Local $title="[TITLE:Data Download;CLASS:#32770]"

WinActivate$titleLocal $hDlgWnd=WinWaitActive$titleWinClose$hDlgWndControlClick$hDlgWnd"","[TEXT:关闭]"Sleep500)

 

;Close Window

Local $title="[CLASS:TdxW_MainFrame_Class]"

WinActivate$titleLocal $hMainWnd =WinWaitActive$titleWinClose$hMainWnd)

 

;Confirm Exit

Local $hMainWnd=WinWaitActive"[TITLE:Exit Confirmation CLASS:#32770]"ControlClick$hMainWnd"""[TEXT:Exit"EndFunc

 

 

 

Edited by Jos
added codebox
Link to comment
Share on other sites

  • Developers
Posted (edited)

The posted code is invalid as it contains an endfunc on line 7 without a starting Func, so please post a runnable script first when you like to get some help.
Also get rid of these invalid literal string definitions like 

Until‘Download Completed’

A proper literal string is 'Dowload Complered' or "Dowload Complered". 

PS: No need to resurrect an 11 years old topic to post your issue! ;)
Split of the post into its own topic and added a codebox

 

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

1 hour ago, Jos said:

The posted code is invalid as it contains an endfunc on line 7 without a starting Func, so please post a runnable script first when you like to get some help.
Also get rid of these invalid literal string definitions like 

Until‘Download Completed’

A proper literal string is 'Dowload Complered' or "Dowload Complered". 

PS: No need to resurrect an 11 years old topic to post your issue! ;)
Split of the post into its own topic and added a codebox

 

Thanks for your comments. I am just a newbie bumped into Autoit. Will look into it. 

PS: If I do not post the code, expert like you would not know what I was talking about.  Again thanks for taking the time.

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...