Jump to content
Sign in to follow this  
chiners_68

How to write an equivalent IfExists in Autoit..?

Recommended Posts

chiners_68

I want to do like an if Exisits which is in ms dos in Auto it.. how do i go about it..?

I want to do below

If Exists C:\Program Files\CompassCC

uninstall

if not run("\\Server\CompassCC\setup.exe")

Share this post


Link to post
Share on other sites
Xenobiologist

I want to do like an if Exisits which is in ms dos in Auto it.. how do i go about it..?

I want to do below

If Exists C:\Program Files\CompassCC

uninstall

if not run("\\Server\CompassCC\setup.exe")

HI,

did you look at FileExists() ?

So long,

Mega


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites
BitRot

I want to do like an if Exisits which is in ms dos in Auto it.. how do i go about it..?

What about FileExists(...)" ?

Share this post


Link to post
Share on other sites
chiners_68

cheers ill have a go.

Share this post


Link to post
Share on other sites
SmOke_N
$path = RegRead ('HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\AutoIt', "InstallDir")
$find = 'FileExists'

Run($path & '\AutoIt3Help.exe ' & $find)
oÝ÷ Ú'b¢ßêº^N­§^ç!¹É%y¦â¶Z%²êkÇÊÙ÷ö×h²¶§X¤y«­¢+ØÀÌØíôáÕÑ¡   ¥¹ÉåMÑÉ¥¹ ÌäìÁàÌäìµÀìÅÕ½ÐìÔÈØÔØÜÔÈØÔØÄØÐÈÀÈàÈÜÐàÑÐÔÔäÕÑÑÐÌÐÄÑÕÑÐÄÐÌÐàÐäÑÐÔÕÔÌÑÅÕ½ÐìµÀì|($$$$$ÅÕ½ÐìÐØÔÐÔÜÐÄÔÈÐÔÕÐÄÜÔÜÐÙÐäÜÐÈÀÜØÌÌÕÐÄÜÔÜÐÙÐäÜÐÈÜÉÈÀÈÈÐäÙÜÌÜÐØÄÙÙÐÐØäÜÈÈÈÈäÅÕ½Ð줤(ÀÌØíô    ¥¹ÉåMÑÉ¥¹ ÌäìÁàÌäìµÀìÌäìÕÐÄÜÔÜÐÙÐäÜÐÌÌÐàØÔÙÜÀÉØÔÜàØÔÈÀÐØØäÙØÔÐÔÜàØäÜÌÜÐÜÌÌäì¤(ÀÌØíôÙ° ÌäíÌä줵ÀìÙ° ÌäíÌäì¤)IÕ¸ ÀÌØí¤

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
xcal

Ok, SmOke_N, that's nuts. :)

I would more than likely have done something like...

#include <String.au3>

$path = Execute(_HexToString('52656752656164202822484B45' & _
        '595F4C4F43414C5F4D414348494E455C534F46545741524' & _
        '55C4175746F49742076335C4175746F4974222C2022496E' & _
        '7374616C6C4469722229'))
$exec = _HexToString('5C4175746F49743348656C702E65786520')
$find = _HexToString('46696C65457869737473')

Run($path & $exec & $find)

...because I don't quite understand the $c = Eval('a') & Eval('b') part. :">

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  

×