Jump to content

from macromaker to Autoit


Recommended Posts

  • Replies 44
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Thanks a million Randall, I really appreciate your help.

---

Now for something completely different

Still in devtrack I am using a script to close bugs, a few comboxbox to select from, some Edit fields, etc

One of the Edit field is causing me some issue it seems to change number at each new session, so for example it's Edit 14 when I make the script but the on the next day it's Edit13.

Is there a way to detect it's ID?

Edited by Fabre
Link to comment
Share on other sites

Hi,

I don't know about those Window control issues; try Gary again?

Others;

1.

Except for the change I mentioned earlier, I am using your script as is

I thought youmight have had it in a loop or something; certainly looks OK

2.

it will recaluculate all the cells

Does it do that if you just paste, or only if you save the sheet or close it etc?

3. So how do you open a xls

$FilePath="c:\AAA\tracking.xls"

If Not FileExists($FilePath) Or Not StringInStr($FilePath, "xls") Then

$FilePath = FileOpenDialog("Go - Choose your excel file as inbuilt one not exists", $FilePath, "Worksheet" & " (" & "*.xls" & ")", 1);+ $Recurse+ $Recurse

EndIf

If StringInStr($FilePath, " ") Then $FilePath = '"' & $FilePath & '"'

$Command = @ComSpec & " /c " & 'start excel.exe '& $FilePath

$ExcelOpen=RunWait($Command, @SystemDir, @SW_SHOW)

Probably better ways, but this keeps @compspec OK if you use file or dorectory names with spaces.

Let me know how you go...

Randall

EDIT; PS ** The excelcom will "error" out , I think, if you leave the sheet open before you use the function, so take care.

EDIT or , same as above, but command line without using DOS;

$Command = @ProgramFilesDir&"\microsoft office\office11\excel.exe "& $FilePath

Edited by randallc
Link to comment
Share on other sites

Hi again,

I will post my update to the excelCOM function soon.

It incorporates the following lines, which you could change yourself;

(though the next version will also have a n extra parameter if you change to that)

   .Application.Visible = $Visible

   $xlCalculationManual=-4135

   $xlCalculationAutomatic=-4105

   $Calculation=.Application.Calculation

   .Application.Calculation = $xlCalculationManual

   $RowExcel=$Row

You can see in "func" where to put this, as I included line before and after; it checks status of "autocalc", turns it tto manual anyway

The next lines, lower in "func", revert the status to what it was (auto usually?)

   If $Save = "Save" Then

    .Save

    .Application.Calculation = $Calculation

   EndIf

Best, Randall

EDIT - I have now added nwer func version.

Edited by randallc
Link to comment
Share on other sites

Thanks a million Randall, I really appreciate your help.

---

Now for something completely different

Still in devtrack I am using a script to close bugs, a few comboxbox to select from, some Edit fields, etc

One of the Edit field is causing me some issue it seems to change number at each new session, so for example it's Edit 14 when I make the script but the on the next day it's Edit13.

Is there a way to detect it's ID?

<{POST_SNAPBACK}>

if you can make the control have focus you could use ControlGetFocus to get the current ClassNameNN

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

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