Jump to content
Sign in to follow this  
Valuater

Welcome to AutoIt 1-2-3

Recommended Posts

Mine is Windows . Ummmm......sorry for asking so many newbie quetions but what am i suppose to do with that CODE???

Thanks again =D

LOL... That says alot, is it Windows 3.1 :think:?

@Valuater - Still should have an error handler there IMO.


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

Win9x systems don't have the psapi.dll

2 things to do

1 add the error handling in the function

2 if win9x fileinstall the file maybe

Func _ReduceMemory($dll = "psapi.dll")
    Local $ai_Return = DllCall($dll, 'int', 'EmptyWorkingSet', 'long', -1)
    If @error Then Return 1
    Return $ai_Return[0]
EndFunc  ;==>_ReduceMemory

SciTE for AutoItDirections for Submitting Standard UDFs

 

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

 

Share this post


Link to post
Share on other sites

how about

Func _ReduceMemory($dll = "psapi.dll")
    If StringInStr(@OSTYPE, "WIN32_WINDOWS") And Not FileExists(@ScriptDir & "\psapi.dll") Then
        FileInstall("C:\Program Files\AutoIt3\psapi.dll", @ScriptDir & "\psapi.dll")
    EndIf
    Local $ai_Return = DllCall($dll, 'int', 'EmptyWorkingSet', 'long', -1)
    If @error Then Return 1
    Return $ai_Return[0]
EndFunc  ;==>_ReduceMemory

it seems he DID NOT already have Autoit on his system, so this would return an error only untill he downloads Autoit... the first button

Right??

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

how about

Func _ReduceMemory($dll = "psapi.dll")
    If StringInStr(@OSTYPE, "WIN32_WINDOWS") And Not FileExists(@ScriptDir & "\psapi.dll") Then
        FileInstall("C:\Program Files\AutoIt3\psapi.dll", @ScriptDir & "\psapi.dll")
    EndIf
    Local $ai_Return = DllCall($dll, 'int', 'EmptyWorkingSet', 'long', -1)
    If @error Then Return 1
    Return $ai_Return[0]
EndFunc ;==>_ReduceMemory

it seems he DID NOT already have Autoit on his system, so this would return an error only untill he downloads Autoit... the first button

Right??

8)

Not sure if will still error after installing autoit, don't have any pre WinXP systems to test on.

SciTE for AutoItDirections for Submitting Standard UDFs

 

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

 

Share this post


Link to post
Share on other sites

Mine is Windows . Ummmm......sorry for asking so many newbie quetions but what am i suppose to do with that CODE???

Thanks again =D

02Freak... please use the link below to download Autoit v3

after installing autoit, please try "Welcome to Autoit 1-2-3" again... and report back here if it works or not

thanks Valuater

http://www.autoitscript.com/cgi-bin/getfil...it-v3-setup.exe

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Hello,

This looks like a great tutorial, however, I get an error when I select the 'Show Me SciTE - Editor' (first button) from Step Number Two. The error is...

Titlebar - AutoIt Error

Message - Line 14 (File"D:\apps\Autoit_123\Lessons\Lesson-1.au3"):

no semi-colon is used for commands. ; Notice the "for" is highlighted and known as a commnad.

^ERROR

Error: Unknown function name.

I have found the reason for the error, but wanted to post it here in case some else is getting it and cannot find the solution. The issue is with the default action for files with the extension of AU3. When I double clicked on my first AU3 file, I was asked (Windows XP) what I wanted the defualt action to be when I double clicked an AU3 file. I selected 'run'. In the case of this tutorial, that is not the correct solution as the Lesson-1.au3 script is more a document to read than a script to run.

To change this setting, do the following...

Open Windows Explorer

Select Tools | Folder Options...

Select the 'File Types' tab

Select the entry for AU3 files

Select the Advanced button (lower right side)

Select the entry for 'Edit Script' under the 'Actions' section

Select the 'Set Default' button (middle right side)

Select OK

Select Close

Share this post


Link to post
Share on other sites

I already have Autoit earlier. Mine is beta 3.1.1.99 and i already have IE. I just dont know why cant i open Autoit1-2-3.exe. Is the psapi.dll suppose to be in the Autoit1-2-3 file?

Share this post


Link to post
Share on other sites

I already have Autoit earlier. Mine is beta 3.1.1.99 and i already have IE. I just dont know why cant i open Autoit1-2-3.exe. Is the psapi.dll suppose to be in the Autoit1-2-3 file?

try putting this file in the SAME folder as Autoit 123

it is from the autoit3 folder

8)

Edited by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites

Hello,

This looks like a great tutorial, however, I get an error when I select the 'Show Me SciTE - Editor' (first button) from Step Number Two. The error is...

Titlebar - AutoIt Error

Message - Line 14 (File"D:\apps\Autoit_123\Lessons\Lesson-1.au3"):

no semi-colon is used for commands. ; Notice the "for" is highlighted and known as a commnad.

^ERROR

Error: Unknown function name.

I have found the reason for the error, but wanted to post it here in case some else is getting it and cannot find the solution. The issue is with the default action for files with the extension of AU3. When I double clicked on my first AU3 file, I was asked (Windows XP) what I wanted the defualt action to be when I double clicked an AU3 file. I selected 'run'. In the case of this tutorial, that is not the correct solution as the Lesson-1.au3 script is more a document to read than a script to run.

To change this setting, do the following...

Open Windows Explorer

Select Tools | Folder Options...

Select the 'File Types' tab

Select the entry for AU3 files

Select the Advanced button (lower right side)

Select the entry for 'Edit Script' under the 'Actions' section

Select the 'Set Default' button (middle right side)

Select OK

Select Close

tiredodftry,

Thanks for posting this error message along with the solution.

taurus905


"Never mistake kindness for weakness."-- Author Unknown --"The highest point to which a weak but experienced mind can rise is detecting the weakness of better men."-- Georg Lichtenberg --Simple Obfuscator (Beta not needed.), Random names for Vars and Funcs

Share this post


Link to post
Share on other sites

whats wrong with it? who cares it just posts peoples scores

I can't run AutIt123 (read my previous posts here - if you find them) so I don't understand what is it about.

By me it should be in some new thread (topic) like "AutoIt123 scores",

so here we should read/post about things related to AutoIt123 and no scores.

In 30 pages it's very difficult to read something.

And pages will be increasing very quickly if we have almost 10000 registered users :think:

So this could at least be moved to such new topic...

Edited by Zedna

Share this post


Link to post
Share on other sites

Typical posts in the AutoIt 1-2-3 topic.

How to use examiner?

Examiner.....

Examiner.....

Examiner.....

Examiner.....

{Huh}

Examiner.....

Examiner.....

Hey! where is my original post gone!....

Examiner.....

Examiner.....

Examiner.....

Examiner.....

Its three pages backwards.

Examiner.....

Examiner.....

Examiner.....

Examiner.....

Examiner.....

Examiner.....

Examiner.....

Examiner.....

:think:

Share this post


Link to post
Share on other sites

I agree with the Examiner problem. Real pain to find anything useful in this topic.


The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...