Sign in to follow this  
Followers 0
SuperNatural

Some functions - general problem

23 posts in this topic

Hello AutoIt forum :)

I'm trying to create my first sciprt, about unattended install such as automatic install about "CCleaner Free Edition 3.14".

I just used some general commands such as "Run" and "Control Click". When I run the script, it execute my commands fast.

BUT after I compile my script into .Exe and run it, sometimes it works slowly, sometimes stuch and even eats my ram!

When I was trying to share it, people were saying the same.. Why does it happend? I have 4GB ram so it can't be :S

Moreover, sometimes when I use the "FileCopy" function, often it doesn't copy the file to the required destination,

and brake all my script. I hate this! sometimes works and sometimes.. no =/

I created a script with many functions, just for testing, which include Run, ControlClick, RegWrite, FileCopy and etc, and it works great..

But after I compile it, it seems to work for me only, because other people are saying it doesn't work (probaly file didn't copied, reg didn't wrote). Just a part of the script works and a part doesn't want to..

Any idea?

I thought that the "Include" function may help me, but I'm not sure.. just a suggest.

Thanks a lot !

Share this post


Link to post
Share on other sites



Post the script, how people help you if don't see where is the error? :)

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Because as I said, those are General Errors:

- Sometimes the script doesn't execute many commands (which usually the same commands).

- Sometimes when I run the exe compiled script, it eats my ram (up to 50%) and even stuck.

So you don't really need the script to understand it, but if you (or others) can't help me, i'll post it.. but just as I said, basic functions, well, still a beginner :)

Edited by SuperNatural

Share this post


Link to post
Share on other sites

Hi, SuperNatural. I would suggest looking into a silent, command line install of your application, rather than trying to script with Run and ControlClick. Here is a link to the slimmed-down version of CCLeaner.exe, for example: http://www.ccleaner.com/download/builds

You can then install silently with a /s switch. Most other applications support some sort of silent install as well, which should make it easier on you as well as reducing the overhead necessary to run your script.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Thanks for your reply :]

Well, this silent command line looks pretty good, but there are two problems:

- First, not all applications support silent command lines (probaly..)

- Second, the silent command line is also an auto install, which install without my attending ;) and I want to make some changes during the install, such as create shortcuts, change destination, etc.. and I can't =/

- Three (not a problem) but I want to make a visible installation and not to install the application on background..

Any more ideas? :)

Why the overhead is so high? only few commands as I said.. =0

Edited by SuperNatural

Share this post


Link to post
Share on other sites

Thanks for your reply :]

Well, this silent command line looks pretty good, but there are two problems:

- First, not all applications support silent command lines (probaly..)

- Second, the silent command line is also an auto install, which install without my attending ;) and I want to make some changes during the install, such as create shortcuts, change destination, etc.. and I can't =/

- Three (not a problem) but I want to make a visible installation and not to install the application on background..

Any more ideas? :)

Why the overhead is so high? only few commands as I said.. =0

Why you can't download the portable version?

And create shortcuts, change destination...

http://www.piriform.com/ccleaner/download/portable

Why the overhead is so high? only few commands as I said --> Post the script

Share this post


Link to post
Share on other sites

Hi, SuperNatural. To answer your overhead question, I can only say that it is impossible to say without seeing your full code. If you would like to post it, we can try to step through it with you to find the issue(s).

Secondly, if you are looking to change a number of public properties within your installation of an application, you may end up having to run it through an application such as WiX (free). This will allow you to set all your options once, then create an MSI out of it. That way you are not having to do it over and over again. :)


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

Thanks for replies. I just read some articles about problems like mine and I just understood that the posibility is that there's unnecessary variables or stuff.. O=

Anyway, I don't need this anymore :]

(And forumer100 - the code isn't secret at all, the problem is that I don't have the code anymore.. probaly didn't saved it :S )

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

But I have another important question so i'll be glad to get some help :)

I'm trying to make auto install for that CCleaner with MOUSECLICK.

Assuming that many people with deffirent screen resolution (probaly) have the same version of CCleaner for example.

How can I find the correct coords which will work on any screen resolution?

Thanks !

Edited by SuperNatural

Share this post


Link to post
Share on other sites

Supernatural,

you have all the answers you need for installing CCleaner ( non of which involve MouseClick )...

Also, SCITE has a feature to create backups to your source auto-magically...it's under "general Setting" of the SCITE Config Tool...

kylomas


Forum Rules         Procedure for posting code

"I like pigs.  Dogs look up to us.  Cats look down on us.  Pigs treat us as equals."

- Sir Winston Churchill

Share this post


Link to post
Share on other sites

kylomas,

I'm trying to install CCleaner by MouseClick, and I have some questions above you..

And I just installed the AutoIt once again after 3 monthes, so..

Hope to get answers :)

Share this post


Link to post
Share on other sites

Silent installs are really not a viable solution anymore. I loved them for years but now everybody is anxious to squeeze every penny out of an app even when it's freeware. Primarily by setting the default installation to install some other crapware like toolbars for which they in return are paid a meager sum.


George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites

maybe @desktopheight & @DesktopWidth will help with different resolutions


All by me:

"Sometimes you have to go back to where you started, to get to where you want to go." 

"Everybody catches up with everyone, eventually" 

"As you teach others, you are really teaching yourself."

From my dad

"Do not worry about yesterday, as the only thing that you can control is tomorrow."

 

WindowsError.gif

WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF

AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send

StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2

AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit  Docs

SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF

Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language

Programming Tips

Excel Changes

ControlHover.UDF

GDI_Plus

Draw_On_Screen

GDI Basics

GDI_More_Basics

GDI Rotate

GDI Graph

GDI  CheckExistingItems

GDI Trajectory

Replace $ghGDIPDll with $__g_hGDIPDll

DLL 101?

Array via Object

GDI Swimlane

GDI Plus French 101 Site

GDI Examples UEZ

GDI Basic Clock

GDI Detection

Ternary operator

Share this post


Link to post
Share on other sites

Silent installs are really not a viable solution anymore. I loved them for years but now everybody is anxious to squeeze every penny out of an app even when it's freeware. Primarily by setting the default installation to install some other crapware like toolbars for which they in return are paid a meager sum.

I agree wholeheartedly about the crapware, GEOSoft. Silent/minimal installs definitely take more time on our end nowadays, but I think they're still worthwhile. Avoiding the toolbars, autoupdates and assorted bloatware is one of the reasons I always suggest something like WiX to wrap the install. That way not only do we install only what we want on a machine, but future upgrades are a breeze as long as it is in an MSI format.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

#15 ·  Posted (edited)

I understand JLogan3o13, thanks.

So I won't make an Silent installs, just testing automatic installs :]

maybe @desktopheight & @DesktopWidth will help with different resolutions

Can you please give me an example how to use those functions?

And if other people can help me:

How can I find the coordinates of an active window which will work on any screen resolution ?

Edited by SuperNatural

Share this post


Link to post
Share on other sites

#16 ·  Posted (edited)

They are not functions but macros (by the way there are quite a few macros) - use it as/like a variable and it will hold the value of the desktop the script is running on.

edit - like this

MsgBox('','Resolution','DesktopHeight = ' & @DesktopHeight _
& @CRLF & "DesktopWidth = " & @DesktopWidth)

EIDT TWO

looks like the code tags are not working with @

Edited by nitekram

All by me:

"Sometimes you have to go back to where you started, to get to where you want to go." 

"Everybody catches up with everyone, eventually" 

"As you teach others, you are really teaching yourself."

From my dad

"Do not worry about yesterday, as the only thing that you can control is tomorrow."

 

WindowsError.gif

WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF

AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send

StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2

AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit  Docs

SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF

Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language

Programming Tips

Excel Changes

ControlHover.UDF

GDI_Plus

Draw_On_Screen

GDI Basics

GDI_More_Basics

GDI Rotate

GDI Graph

GDI  CheckExistingItems

GDI Trajectory

Replace $ghGDIPDll with $__g_hGDIPDll

DLL 101?

Array via Object

GDI Swimlane

GDI Plus French 101 Site

GDI Examples UEZ

GDI Basic Clock

GDI Detection

Ternary operator

Share this post


Link to post
Share on other sites

SuperNatural, have you done a search of the forums? I know your question has been asked before. Try this recent thread.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

#18 ·  Posted (edited)

They are not functions but macros (by the way there are quite a few macros) - use it as/like a variable and it will hold the value of the desktop the script is running on.

edit - like this

MsgBox('','Resolution','DesktopHeight = ' & @DesktopHeight _
& @CRLF & "DesktopWidth = " & @DesktopWidth)

EIDT TWO

looks like the code tags are not working with @

Ok.. so I get that my resolution is 1366 * 768.. but I don't understand how it's gonna help me =/

How can I get coordinates of an active window, which will work on any resolution ?

SuperNatural, have you done a search of the forums? I know your question has been asked before. Try this recent thread.

I read it but I don't understand what they were talking about..

Look, I have a better example:

I found a piece of script that someone has posted in a forum of my country, and he used some coordinates for a software with the MouseClick function.

It works great on my computer and my resolution, and I sure we have a different resolution (also all the comments were positive).

So I was trying to find the coordinates for that software on my computer, and it's not the same..

if for example his coordinates were 300,400, mine were 650, 720.. :/

how can I find the coordinates which will work on any computer resolution? =/

That's what I want to know :)

Edited by SuperNatural

Share this post


Link to post
Share on other sites

supernatural,

(what have you tried) + (what is it for) = help

If this is still CCleaner replies #4, #6 and #8 answer your question.

kylomas


Forum Rules         Procedure for posting code

"I like pigs.  Dogs look up to us.  Cats look down on us.  Pigs treat us as equals."

- Sir Winston Churchill

Share this post


Link to post
Share on other sites

No kylomas, this is not for that CCleaner.. this is GENERAL about softwares.

- Yes, I tried.

- Is it for automate softwares for my different personal uses.

Now can I get help?

I just trying to figure out how to do that.. do what? quote of my reply:

I found a piece of script that someone has posted in a forum of my country, and he used some coordinates for a software with the MouseClick function.

It works great on my computer and my resolution, and I sure we have a different resolution (also all the comments were positive).

So I was trying to find the coordinates for that software on my computer, and it's not the same..

if for example his coordinates were 300,400, mine were 650, 720.. :/

how can I find the coordinates which will work on any computer resolution? =/

Thanks..

Share this post


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
Sign in to follow this  
Followers 0