Jump to content
Sign in to follow this  
caramen

Ini read @

Recommended Posts

caramen

Hello guy

I wanna read an simple "@" from my init file but does not working and when he read an "@" he skiping also one letter after

Script:

$IDe              = IniRead ($SettingsFile, 'Intervention', 'De', "ERROR")

Settings.ini

De=Assistance@*********.com

 

the value that i got when i lunch the script is

Assistance*******.com

What does i have to include :o ?

Edited by caramen

Share this post


Link to post
Share on other sites
JLogan3o13

Can you please post your entire script? This runs fine for me, and shows the @ symbol:

Contents of ini:

[Intervention]
De=Assistance@Google.com

Script:

$sIni = @DesktopDir & "\My.ini"
$sLine = IniRead($sIni, "Intervention", "De", "")
MsgBox(0, "", $sLine)

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

Share this post


Link to post
Share on other sites
water

Works fine here.

Which version of AutoIt do you run?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2018-09-01 - Version 1.3.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
caramen

hmmmm version ...

v3.3.10.2

 

The script is not doing anything else but there is personnal info inside i have to reedit one second plz

Share this post


Link to post
Share on other sites
water

I tested with 3.3.10.2 and 3.3.11.3.

Works fine here.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2018-09-01 - Version 1.3.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
caramen

it can be my computer ?

does i need framwork on something ?

Share this post


Link to post
Share on other sites
caramen

;~ --------------------------------------------------------------------------------------
;~ Script Variables & configs
Opt("MouseCoordMode", 0)
Opt("PixelCoordMode", 0)
HotKeySet("{PAUSE}", "Pause")
Global $Paused
HotKeySet("{escape}", "Exite")
HotKeySet("{F2}", "Intervention")
HotKeySet("{F3}", "Consommable")
Dim $var
Dim $p

;~ --------------------------------------------------------------------------------------
;~ Scipt Version & editor
MsgBox ( 0, "Thank you", "V 1.1 Edited by ******. ******")


;~ --------------------------------------------------------------------------------------
$SettingsFile = @SCRIPTDIR & 'Settings.ini'

$IDe              = IniRead ($SettingsFile, 'Intervention', 'De', "ERROR")
$IDestinataire     = IniRead ($SettingsFile, 'Intervention', 'Destinataire', "ERROR")
$ICopie         = IniRead ($SettingsFile, 'Intervention', 'Copie', "ERROR")
$IMessage         = IniRead ($SettingsFile, 'Intervention', 'Message', "ERROR")
$IMessage2        = IniRead ($SettingsFile, 'Intervention', 'Message2', "ERROR")

$CDe              = IniRead ($SettingsFile, 'Consommable', 'De', "ERROR")
$CDestinataire    = IniRead ($SettingsFile, 'Consommable', 'Destinataire', "ERROR")
$CCopie         = IniRead ($SettingsFile, 'Consommable', 'Copie', "ERROR")
$CMessage        = IniRead ($SettingsFile, 'Consommable', 'Message', "ERROR")
$CMessage2        = IniRead ($SettingsFile, 'Consommable', 'Message2', "ERROR")


;~ --------------------------------------------------------------------------------------
;~ Script structure:

Demarrage ()

While (1)
 Xerox ()
WEnd

Intervention ()
Consommable ()

Pause ()
Exite ()


;~ --------------------------------------------------------------------------------------
;~ Script functions

Func Demarrage ()
    Sleep(10000)
EndFunc

Func Xerox ()

   While (1)

    Sleep (5000)

   WEnd

EndFunc

Func Intervention ()
    Send     ("{LSHIFT Down}")
    Sleep     (10)
    Send     ("{TAB}")
    Send     ("{LSHIFT up}")
    Send     ($IDe)
    Send     ("{TAB}")
    Send     ($IDestinataire)
    Send     ("{TAB}")
    Send     ($ICopie)
    Send     ("{TAB}")
    Send     ("{TAB}")
    Send     ("{TAB}")
    Send     ($IMessage)
    Send     ("{ENTER}")
    Send     ($IMessage2)

EndFunc

Func Consommable ()
    Send     ("{LSHIFT Down}")
    Sleep     (10)
    Send     ("{TAB}")
    Send     ("{LSHIFT up}")
    Send     ($CDe)
    Send     ("{TAB}")
    Send     ($CDestinataire)
    Send     ("{TAB}")
    Send     ($CCopie)
    Send     ("{TAB}")
    Send     ("{TAB}")
    Send     ("{TAB}")
    Send     ($CMessage)
    Send     ("{ENTER}")
    Send     ($CMessage2)
EndFunc

Func Exite ()
    Exit
EndFunc

Func Pause()
    $Paused = NOT $Paused
While  $Paused
        Sleep (500)
WEnd
EndFunc; => Pause()
 

Share this post


Link to post
Share on other sites
JLogan3o13

No you don't need a framework. Please post a reproducer that fails for you, so we can see what you're doing.

Edit: Too slow.

Edited by JLogan3o13

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

Share this post


Link to post
Share on other sites
caramen

after tryed F3

that send EROOR only wtf -.-

Share this post


Link to post
Share on other sites
caramen

No you don't need a framework. Please post a reproducer that fails for you, so we can see what you're doing.

Edit: Too slow.

What is reproducer is it a new function ?

Share this post


Link to post
Share on other sites
water

How do you notice that you get invalid values from IniRead? Do you do a ConsoleWrite or MsgBox?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2018-09-01 - Version 1.3.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
water

A reproducer (script) is a stripped down script that only contains the necessary statements to reproduce the error.

In your case something like:

$SettingsFile = @SCRIPTDIR & '\Settings.ini'
$IDe              = IniRead ($SettingsFile, 'Intervention', 'De', "ERROR")
MsgBox(0, "", $IDe)

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2018-09-01 - Version 1.3.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
caramen

How do you notice that you get invalid values from IniRead? Do you do a ConsoleWrite or MsgBox?

Watch the scipt i posted on #7

Share this post


Link to post
Share on other sites
water

So you see after the Send statement that the wrong value arrives in the target GUI?

Try

Send($IDe, 1)

so AutoIt doesn't interpret the string you send.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2018-09-01 - Version 1.3.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
caramen

So you see after the Send statement that the wrong value arrives in the target GUI?

Try

Send($IDe, 1)

so AutoIt doesn't interpret the string you send.

;~ --------------------------------------------------------------------------------------
;~ Script Variables & configs
Opt("MouseCoordMode", 0)
Opt("PixelCoordMode", 0)
HotKeySet("{PAUSE}", "Pause")
Global $Paused
HotKeySet("{escape}", "Exite")
HotKeySet("{F2}", "Intervention")
HotKeySet("{F3}", "Consommable")
Dim $var
Dim $p

;~ --------------------------------------------------------------------------------------
;~ Scipt Version & editor
MsgBox ( 0, "Thank you", "V 1.1 Edited by ******. ******")


;~ --------------------------------------------------------------------------------------
$SettingsFile = @SCRIPTDIR & '\Settings.ini'

$IDe            = IniRead ($SettingsFile, 'Intervention', 'De', "ERROR")
$IDestinataire  = IniRead ($SettingsFile, 'Intervention', 'Destinataire', "ERROR")
$ICopie         = IniRead ($SettingsFile, 'Intervention', 'Copie', "ERROR")
$IMessage       = IniRead ($SettingsFile, 'Intervention', 'Message', "ERROR")
$IMessage2      = IniRead ($SettingsFile, 'Intervention', 'Message2', "ERROR")

$CDe            = IniRead ($SettingsFile, 'Consommable', 'De', "ERROR")
$CDestinataire  = IniRead ($SettingsFile, 'Consommable', 'Destinataire', "ERROR")
$CCopie         = IniRead ($SettingsFile, 'Consommable', 'Copie', "ERROR")
$CMessage       = IniRead ($SettingsFile, 'Consommable', 'Message', "ERROR")
$CMessage2      = IniRead ($SettingsFile, 'Consommable', 'Message2', "ERROR")


;~ --------------------------------------------------------------------------------------
;~ Script structure:

Demarrage ()

While (1)
 Xerox ()
WEnd

Intervention ()
Consommable ()

Pause ()
Exite ()


;~ --------------------------------------------------------------------------------------
;~ Script functions

Func Demarrage ()
    Sleep(10000)
EndFunc

Func Xerox ()

   While (1)

    Sleep (5000)

   WEnd

EndFunc

Func Intervention ()
    Send    ("{LSHIFT Down}")
    Sleep   (10)
    Send    ("{TAB}")
    Send    ("{LSHIFT up}")
    Send    ($IDe, 1)
    Send    ("{TAB}")
    Send    ($IDestinataire, 1)
    Send    ("{TAB}")
    Send    ($ICopie, 1)
    Send    ("{TAB}")
    Send    ("{TAB}")
    Send    ("{TAB}")
    Send    ($IMessage, 1)
    Send    ("{ENTER}")
    Send    ($IMessage2, 1)

EndFunc

Func Consommable ()
    Send    ("{LSHIFT Down}")
    Sleep   (10)
    Send    ("{TAB}")
    Send    ("{LSHIFT up}")
    Send    ($CDe, 1)
    Send    ("{TAB}")
    Send    ($CDestinataire, 1)
    Send    ("{TAB}")
    Send    ($CCopie, 1)
    Send    ("{TAB}")
    Send    ("{TAB}")
    Send    ("{TAB}")
    Send    ($CMessage, 1)
    Send    ("{ENTER}")
    Send    ($CMessage2, 1)
EndFunc

Func Exite ()
    Exit
EndFunc

Func Pause()
    $Paused = NOT $Paused
While  $Paused
        Sleep (500)
WEnd
EndFunc; => Pause()

I got the same issue :

Share this post


Link to post
Share on other sites
water

Can you please run the reproducer I posted in #12?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2018-09-01 - Version 1.3.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
caramen

The reproducer is working fine

So my script got something wrong but what hmmmmmmmmmmmmmmmmmmmm

Edited by caramen

Share this post


Link to post
Share on other sites
water

Insert

MsgBox(0, "", $IDe)

before

Send     ($IDe)

so you will know that you try to send the correct data.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2018-09-01 - Version 1.3.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
water

What kind of application do you send the data to?

A Java application, a web form in a browser, a simple Windows GUI ...?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2018-09-01 - Version 1.3.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
caramen

If i do

MsgBox(0, "", $IDe)
Then
Send     ($IDe)
 

i got the correct msg box and a false send value

(in the same script)

Edited by caramen

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  

×