atwright Posted August 24, 2008 Posted August 24, 2008 Hi Guys, I am trying to automate the backup of Sage Line 50 (accounting software). How would I scrape the company name from the backup window, then echo it into the filename field? Here is the AU3info Summary (I need the text which reads "**Company Name Text**"):expandcollapse popup>>>> Window <<<< Title: Class: #32770 Position: 388, 224 Size: 503, 576 Style: 0x94C800C4 ExStyle: 0x00010101 Handle: 0x003B022E >>>> Control <<<< Class: #32770 Instance: 1 ClassnameNN: #327701 Advanced (Class): [CLASS:#32770; INSTANCE:1] ID: Text: Backup Company Position: 13, 31 Size: 471, 483 ControlClick Coords: 401, 473 Style: 0x50000044 ExStyle: 0x00010000 Handle: 0x001303B2 >>>> Mouse <<<< Position: 805, 750 Cursor ID: 0 Color: 0xD6D3CE >>>> StatusBar <<<< >>>> Visible Text <<<< &OK Cancel &Help Backup Company Company Details Where do you want the company backed up to? B&rowse Company Name: **Company Name Text** Found In: C:\DOCUMENTS AND SETTINGS\ALL USERS\APPLICATION DATA\SAGE\ACCOUNTS\2008\COMPANY.000\ You are about to create a backup of: Filename : SageBack 24-08-2008.001 Location : C:\#Company Data\Backup We have suggested a filename and location to save this backup to. If you are happy with this suggestion click OK. If not enter a filename and use Browse to select the location for your backup. Backing Up to removable media? Insert the device before clicking OK. Backing Up to CD? Refer to the Help now. >>>> Hidden Text <<<< Advanced Options File types to include in backup Custom1 Description of backup for company Backup of : - Data Files. Backup created by MANAGER 24/08/2008 Sele&ct all file types to include in backup Previous Backups Backups Taken &Swap &Clear D&elete I need the filename field to change to: "**Company Name** SageBack 24-08-2008.001" (the stars are just to make it easier to spot). Any help you can offer would be hugely appreciated. Thank you for taking the time to read my question...
rudi Posted August 24, 2008 Posted August 24, 2008 Hi. atwright said: I need the filename field to change to: "**Company Name** SageBack 24-08-2008.001" (the stars are just to make it easier to spot).I don't know your SW, but I assume, that this is a control offering the backup file name "24-08-2008.001"?Use the autoit window info tool to get the name of that control. Then use $CurrentText=ControlGetText() to read, what's in there.Use $NewText="Company Name" & $CurrentText to modify as needed.Use ControlSetText() to "drop" $NewText with the file name you need into yuor dialog.Regards, Rudi. Earth is flat, pigs can fly, and Nuclear Power is SAFE!
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now