Sign in to follow this  
Followers 0
suckinsyn

SMS Lite - send sms from your desktop (currently only in Poland)

3 posts in this topic

Hey there, folks. I have expanded my previous sms script (link here) to the point that it can be used by anyone without a problem. 

Currently, as said in topic, it's working only with Polish numbers - I do not have enough knowledge about foreign country services that allow to send free text msgs, so if anyone could provide me some info, I would be glad. 

Picture of GUI:

aE3I9nb.png

Dane = sms details, such as Numer odbiorcy, which is target number starting with siec (first three numbers as they are representing the provider) and ending with last six numbers. You can use only numbers there. Nadawca and Tresc are the sender name and the text itself. Sender name is max 12 afaik (cba to check source) and text is max 60 letters long.

By pressing 'Zatwierdz' script checks if number is valid. If it is, button to send sms is enabled, if not, it's disabled. You can chose to send 1 sms or to send x amount of them, theres 2 buttons.

Timer on right side is not yet done. Any ideas to help me out doing it would be cool, although I've though of using variable to declare how much script would have to wait, something like this:

Sleep($some_variable_from_checkbox)

If I can't make it like that, any ideas, as said, would be nice.

Here's the code of the app:

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Outfile=C:\Users\qwe\Desktop\(32 bit)SMS Lite 1.2.exe
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <MsgBoxConstants.au3>
#include <GUIListBox.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <IE.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("SMS lite 1.2", 275, 460, 263, 315)
$Group1 = GUICtrlCreateGroup(" Error log ", 8, 232, 257, 41)
$error_label = GUICtrlCreateLabel("Wybrana siec: X", 25, 250, 119, 17)
$error_label2 = GUICtrlCreateLabel("Poprawny numer: X", 135, 250, 119, 17)
GUICtrlSetFont($error_label, 8, 800, 0, "MS Sans Serif")
GUICtrlSetColor($error_label, 0xce0000)
GUICtrlSetFont($error_label2, 8, 800, 0, "MS Sans Serif")
GUICtrlSetColor($error_label2, 0xce0000)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group2 = GUICtrlCreateGroup("Dane", 8, 8, 257, 217)
$Input1 = GUICtrlCreateInput("", 76, 48, 49, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_NUMBER))
GUICtrlSetLimit($Input1, 6)
$OK = GUICtrlCreateButton("Zatwierdz", 32, 200, 83, 17)
$Label8 = GUICtrlCreateLabel("Numer odbiorcy", 32, 30, 90, 17)
$Label10 = GUICtrlCreateLabel("Nadawca:", 40, 70, 53, 17)
$Input2 = GUICtrlCreateInput("", 24, 88, 100, 21)
GUICtrlSetLimit($Input2, 15)
$Label11 = GUICtrlCreateLabel("Tresc:", 48, 110, 34, 17)
$Input3 = GUICtrlCreateInput("Wpisz tutaj tresc SMS. Maksymalnie mozesz uzyc 60 znakow.", 24, 128, 97, 68, $ES_MULTILINE)
GUICtrlSetLimit($Input3, 60)
$Combo1 = GUICtrlCreateCombo("siec", 24, 48, 49, 25)
$Pic1 = GUICtrlCreatePic("C:\Users\qwe\Desktop\SKULL ICON.gif", 136, 32, 115, 167)
$Label9 = GUICtrlCreateLabel("## BY BRODATY ##", 141, 200, 107, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group4 = GUICtrlCreateGroup(" Wysylanie SMS ", 8, 280, 257, 169)
$Label4 = GUICtrlCreateLabel("Dzienny limit SMS'ow wynosi 30.", 54, 392, 157, 17)
$Label5 = GUICtrlCreateLabel("Chcesz wiecej? Daj znac, dogadamy sie.", 32, 408, 197, 17)
$Group3 = GUICtrlCreateGroup("", 24, 377, 225, 7)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Label6 = GUICtrlCreateLabel("suckinsyn@gmail.com", 72, 424, 109, 17)
$Checkbox1 = GUICtrlCreateCheckbox("wyslij za 10 minut", 136, 312, 105, 17)
$Checkbox2 = GUICtrlCreateCheckbox("wyslij za 30 minut", 136, 328, 105, 17)
$Checkbox3 = GUICtrlCreateCheckbox("wyznacz sam czas", 136, 344, 113, 17)
$Group5 = GUICtrlCreateGroup(" Timer (dodatek) ", 125, 292, 130, 78)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Button1 = GUICtrlCreateButton("Wyslij 1 SMS", 24, 304, 91, 25)
$Button2 = GUICtrlCreateButton("1 do 30 SMS'ow", 24, 348, 91, 25)
$Label1 = GUICtrlCreateLabel("lub sam wybierz ilosc", 18, 331, 102, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
;---------------------------------------------------------;---------------------------------------------------------;---------------------------------------------------------;-------------------------------------------------

GUICtrlSetState($Button1, $GUI_DISABLE)
GUICtrlSetState($Button2, $GUI_DISABLE)

GUICtrlSetState($Checkbox1, $GUI_DISABLE)
GUICtrlSetState($Checkbox2, $GUI_DISABLE)
GUICtrlSetState($Checkbox3, $GUI_DISABLE)

Dane()

Func Dane()

    GUICtrlSetData($Combo1, "500|501|502|503|504|505|506|507|508|509|510|511|512|513|514|515|516|517|518|519|530|531|532|533|534|535|536|537|538|539|600|601|602|603|604|605|606|607|608|609|660|661|662|663|664|665|666|667|668|669|690|691|692|693|694|695|696|697|698|699|721|722|723|724|725|726|727|728|729|730|731|732|733|739|780|781|782|783|784|785|786|787|788|789|790|791|792|793|794|795|796|797|798|799|880|881|882|883|884|885|886|887|888|889", "0")
        Local $sComboRead = ""

While 1
    $nMsg = GUIGetMsg()
        Switch $nMsg
            Case $GUI_EVENT_CLOSE
                Exit

            Case $OK
                $sNR_1 = GUICtrlRead($Combo1)
                $sNR_2 = GUICtrlRead($Input1)

if $sNR_1 = "siec" then
    GUICtrlSetData($error_label,"Wybrana siec: X")
    GUICtrlSetFont($error_label, 8, 800, 0, "MS Sans Serif")
    GUICtrlSetColor($error_label, 0xce0000)
            Else
    GUICtrlSetData($error_label,"Wybrana siec: V")
    GUICtrlSetFont($error_label, 8, 800, 0, "MS Sans Serif")
    GUICtrlSetColor($error_label, 0x4bcc00)
            EndIf

if stringlen(GUICtrlRead($Input1))<6 Then
    GUICtrlSetData($error_label2,"Poprawny numer: X")
    GUICtrlSetFont($error_label2, 8, 800, 0, "MS Sans Serif")
    GUICtrlSetColor($error_label2, 0xce0000)
            Else
    GUICtrlSetData($error_label2,"Poprawny numer: V")
    GUICtrlSetFont($error_label2, 8, 800, 0, "MS Sans Serif")
    GUICtrlSetColor($error_label2, 0x4bcc00)
            EndIf

$tes1 = GUICtrlRead($error_label)
if $tes1 = "Wybrana siec: V" Then
                    $zgoda1 = 1
                Else
                    $zgoda1 = 0
EndIf

$tes2 = GUICtrlRead($error_label2)
if $tes2 = "Poprawny numer: V" Then
                    $zgoda2 = 1
                Else
                    $zgoda2 = 0
EndIf

If $zgoda1 = 1 AND $zgoda2 = 1 Then
GUICtrlSetState($Button1, $GUI_ENABLE)
GUICtrlSetState($Button2, $GUI_ENABLE)
        Else
GUICtrlSetState($Button1, $GUI_DISABLE)
GUICtrlSetState($Button2, $GUI_DISABLE)
        EndIf


            Case $Button1 ; wysyłanie jednego SMS

                        $numer_1 = GUICtrlRead($Combo1)
                        $numer_2 = GUICtrlRead($Input1)
                        $nadawca = GUICtrlRead($Input2)
                        $tresc = GUICtrlRead($Input3)

                                Global $oIE = _IECreate("sms.priv.pl", 0, 0)
                                $oSelect = _IEGetObjByName($oIE, "siec")                            ;select first thing to change
                                _IEFormElementOptionSelect($oSelect, $numer_1, 1, "byText")          ;set the data
                                $oObj = _IEGetObjByName($oIE,"number2")                             ;select second thing to change
                                _IEPropertySet($oObj,"innertext", $numer_2)                           ;set the data
                                $oObj = _IEGetObjByName($oIE,"tresc")                               ;select third thing to change
                                _IEPropertySet($oObj,"innertext", $tresc)                           ;set the data
                                $oObj = _IEGetObjByName($oIE,"od")                                  ;select fourth thing to change
                                _IEPropertySet($oObj,"innertext", $nadawca)                         ;set the data
                                $oForm = _IEGetObjByName($oIE, "bramka")                            ;find the send button
                                $oObj = _IEFormSubmit($oForm)                                       ;send sms
                                Sleep(2000)
                                _IEQuit($oIE)


            Case $Button2 ; wysyłanie wielu SMS

                        $numer_1 = GUICtrlRead($Combo1)
                        $numer_2 = GUICtrlRead($Input1)
                        $nadawca = GUICtrlRead($Input2)
                        $tresc = GUICtrlRead($Input3)

                    Global $oIE = _IECreate("sms.priv.pl", 0, 0)
                        $number = inputbox("Ilosc SMS","Wpisz liczbe od 1 do 30. Pamietaj, dziennie z Twojego IP moze byc wyslane tylko 30 sms. Aby zniesc ten limit skontaktuj sie ze mna przez maila.","",50,100)
                            For $I = 1 to  $number ;repeat $number of times

                                $oSelect = _IEGetObjByName($oIE, "siec")                            ;select first thing to change
                                _IEFormElementOptionSelect($oSelect, $numer_1, 1, "byText")          ;set the data
                                $oObj = _IEGetObjByName($oIE,"number2")                             ;select second thing to change
                                _IEPropertySet($oObj,"innertext", $numer_2)                           ;set the data
                                $oObj = _IEGetObjByName($oIE,"tresc")                               ;select third thing to change
                                _IEPropertySet($oObj,"innertext", $tresc)                           ;set the data
                                $oObj = _IEGetObjByName($oIE,"od")                                  ;select fourth thing to change
                                _IEPropertySet($oObj,"innertext", $nadawca)                         ;set the data
                                $oForm = _IEGetObjByName($oIE, "bramka")                            ;find the send button
                                $oObj = _IEFormSubmit($oForm)                                       ;send sms
                                Sleep(2000)
                            Next
                _IEQuit($oIE)
        EndSwitch
    WEnd
EndFunc



;---------------------------------------------------------;---------------------------------------------------------;---------------------------------------------------------;-------------------------------------------------
While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd

I am almost sure that there is better way to do some things I've done, but I can't describe how happy I am that this actually works.

I also have few ideas how to make the GUI better by using TABS, are they good option? I couldn't find how to make menu with switchable forms. :(

Share this post


Link to post
Share on other sites



Hi countryman.

Nice script.
It works well.

I personally use the REST API available from this supplier:  http://www.smsapi.pl/

But this is commercial REST API solution.

and btw.

please use TIDY before post.

 

Cheers

mLipok


ADO.au3 UDF     POP3.au3 UDF     XML.au3 UDF    How to use IE.au3  UDF with  AutoIt v3.3.14.x  for other useful stuff click the following button:

Spoiler

Last update: 2016-12-23
Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft Components * TeamViewer API -UDF * JavaManagement UDF * VIES over SOAPPOP3.au3 UDF *  RTF Printer - UDF * XML.au3 - BETA * ADO.au3 UDF SMTP Mailer UDF * WinSCP UDF *

My contribution to others projects: * _sql.au3 UDF  *

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Best coding practices * 

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities *

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, The Art of Computer Programming
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

 

Share this post


Link to post
Share on other sites

After a while I am playing with the script again.

To-do:

- menu (or tabs) to switch between various functions

- contact list (add, delete, et cetera - stored in txt file)

- nuke all button (kill any left ie instances based on $pid (this may be hard))

- expand the script so that it may be used in other countries too

I would be glad if someone could tell me which sites are used in other countries to send free sms to people :)

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

  • Similar Content

    • Lights_On
      By Lights_On
      Hi all,

      I am having a little trouble with ‘GUICtrlSetResizing’ an hoping someone could push me in the direction of best practice.

      I have a basic GUI created to a set size with the enabled abilities to resize it:

      GUICreate("Test", 500, 450, -1, -1, BitOR($WS_SIZEBOX, $WS_MAXIMIZEBOX, $WS_MINIMIZEBOX))

      Inside this I have an image and label:

      GUICtrlCreateLabel($Image1StampInfo, 10, 395, 480, 20, $SS_CENTER) GUICtrlCreatePic($TheImage, 25, 25, 450, 350)

      Using:

      Case ($GUI_EVENT_MAXIMIZE or $GUI_EVENT_RESTORE or $GUI_EVENT_RESIZED)

      I activate:

       
      GUICtrlSetResizing($TheImageBox, $GUI_DOCKAUTO) GUICtrlSetResizing($Image1Stamp, $GUI_DOCKAUTO)

      This works fine with the image but not with the label – the label after a bit of resizing seems to get stuck in different places in the GUI as if the $GUI_DOCKAUTO has not worked properly.

      So 2 questions if I may. 

      1)    Have I used $GUI_DOCKAUTO incorrectly for use with lables?

      2)    I am happy to manually set new sizes dynamically but how? I can get the size of the window with ‘WinGetPos()’ but how do I set new size parameters for the ‘label’ and ‘image’?

      Thank you in advance.

    • FrancescoDiMuro
      By FrancescoDiMuro
      Good evening guys ( almost good night here in Italy )  
      How are you? Hop you're fine  
      I'm trying to do a Login Form ( I did, but I'm missing something in the management ), that allows the user to login when the script is launched, and, when the main GUI is opened, the user can Logout and Login with another username and password.
      The username and password "checking" I do is done by a text file, which in there are username and password, crypted through _Crypt_EncryptData().
      The "issue" I'm having at the moment, is to manage the Login form when the user hasn't already done the login, and so, the main GUI is not visible, but is created...
      I create the main GUI after the Login form... I tried with WinActive, WinGetState, but nothing changed ( even at the first Login, the script says ( through a MsgBox ) that the Win does exists ( or is active... ) and, as I want, it is not shown again...

      I really don't know If I missed something, or, I don't know...
      I'm going crazy for this thing...
      If someone could help me, I'd really appreaciate it!
      Thanks for the reading
      #Region ### START Koda GUI section ### Form=C:\Users\Portatile-60\Documents\Documenti Lavoro\AutoIt\Gestione_Magazzino_v2\form_Login.kxf Global $form_Login = GUICreate("Effettua il Login per continuare:", 405, 120, @DesktopWidth/2 - 202.5, @DesktopHeight/2 - 150) ; 302, 218 GUISetOnEvent($GUI_EVENT_CLOSE, "GUIDeleteLogin") Global $combo_Username = GUICtrlCreateCombo("Di Muro Francesco", 104, 64, 217, 25) GUICtrlSetFont(-1, 10, 400, 0, "Arial") GUICtrlSetData($combo_Username, "somedata") Global $input_Password = GUICtrlCreateInput("", 104, 89, 217, 25, BitOR($GUI_SS_DEFAULT_INPUT,$ES_PASSWORD)) GUICtrlSetFont(-1, 10, 400, 0, "Arial") $button_VerificaDati = GUICtrlCreateButton("", 328, 66, 42, 42, $BS_ICON) GUICtrlSetImage(-1, "C:\Users\Portatile-60\Documents\Documenti Lavoro\AutoIt\Gestione_Magazzino_v2\Icone\icon_check.ico", -1) GUICtrlSetOnEvent($button_VerificaDati, "CheckLogin") $label_Titolo = GUICtrlCreateLabel("Login", 167, 14, 71, 33) GUICtrlSetFont(-1, 18, 800, 0, "Arial") $label_Username = GUICtrlCreateLabel("Username :", 24, 64, 76, 20) GUICtrlSetFont(-1, 10, 800, 0, "Arial") $label_Password = GUICtrlCreateLabel("Password :", 24, 89, 73, 20) GUICtrlSetFont(-1, 10, 800, 0, "Arial") #EndRegion ### END Koda GUI section ### Func CheckLogin() Local $sUsername = GUICtrlRead($combo_Username) Local $sPassword = GUICtrlRead($input_Password) MsgBox($MB_ICONINFORMATION, "", "Username: " & $sUsername & @CRLF & "Password: " & $sPassword) Local $sFileUtenti = @ScriptDir & "\utenti.txt" If @error Then MsgBox($MB_ICONERROR, "Errore!", "Errore durante la lettura del file!") Exit Else Local $hFileUtenti = FileOpen($sFileUtenti, $FO_READ) If @error Then MsgBox($MB_ICONERROR, "Errore!", "Errore durante l'apertura del file " & $sFileUtenti & "." & @CRLF & "Errore: " & @error) Else Local $sDatiUtente, $aDatiUtente Local $bUtenteTrovato = False Local $iLinea = 1 Local $sControlloWin = "" Local $sWin = WinGetState($form_GestioneMagazzino) MsgBox($MB_ICONINFORMATION, "", $sWin) If @error Then MsgBox($MB_ICONERROR, "Errore!", "Errore durante la verifica della GUI attiva." & @CRLF & "Errore: " & @error) EndIf If($sWin == 5) Then MsgBox($MB_ICONINFORMATION, "", "La GUI esiste!") Do $sDatiUtente = FileReadLine($hFileUtenti, $iLinea) $aDatiUtente = StringSplit($sDatiUtente, "|", $STR_NOCOUNT) If(BinaryToString(_Crypt_DecryptData($aDatiUtente[0], "CRYPT", $CALG_RC4)) = $sUsername And BinaryToString(_Crypt_DecryptData($aDatiUtente[1], "CRYPT", $CALG_RC4)) = $sPassword) Then $sControlloWin = "ESISTE" $bUtenteTrovato = True ExitLoop Else $iLinea+=1 If($sDatiUtente = "" And $bUtenteTrovato = False) Then MsgBox($MB_ICONWARNING, "Attenzione!", "Username o Password errati.") ExitLoop EndIf EndIf Until $bUtenteTrovato = True Else MsgBox($MB_ICONINFORMATION, "", "La GUI esiste!") Do $sDatiUtente = FileReadLine($hFileUtenti, $iLinea) $aDatiUtente = StringSplit($sDatiUtente, "|", $STR_NOCOUNT) If(BinaryToString(_Crypt_DecryptData($aDatiUtente[0], "CRYPT", $CALG_RC4)) = $sUsername And BinaryToString(_Crypt_DecryptData($aDatiUtente[1], "CRYPT", $CALG_RC4)) = $sPassword) Then $sControlloWin = "NON ESISTE" $bUtenteTrovato = True ExitLoop Else $iLinea+=1 If($sDatiUtente = "" And $bUtenteTrovato = False) Then MsgBox($MB_ICONWARNING, "Attenzione!", "Username o Password errati.") ExitLoop EndIf EndIf Until $bUtenteTrovato = True EndIf If($sControlloWin = "ESISTE") Then MsgBox($MB_ICONINFORMATION, "Login effettuato!", "Hai effettuato l'accesso come: " & @CRLF & $sUsername & ".") ; Setta come "non-cliccabile" il bottone di Login GUICtrlSetState($button_Login, $GUI_DISABLE) GUICtrlSetState($button_VisualizzaGiacenze, $GUI_ENABLE) GUICtrlSetState($button_AggiungiProdotto, $GUI_ENABLE) GUICtrlSetState($button_PrelevaProdotto, $GUI_ENABLE) GUICtrlSetState($button_RicercaProdotto, $GUI_ENABLE) GUICtrlSetState($button_CreaDDT, $GUI_ENABLE) GUICtrlSetState($button_MostraGiacenzeAZero, $GUI_ENABLE) GUICtrlSetState($combo_Magazzino, $GUI_ENABLE) GUICtrlSetState($button_Logout, $GUI_ENABLE) ; Setta come "non-cliccabile" il bottone di Login GUICtrlSetState($button_Login, $GUI_DISABLE) ; Setta l'utente che ha effettuato l'accesso nella label $label_CaptionUtente GUICtrlSetData($label_CaptionUtente, $sUsername) ; "Distruggi" la GUI Login GUIDelete($form_Login) FileClose($hFileUtenti) Else MsgBox($MB_ICONINFORMATION, "", "La GUI non esiste!") MsgBox($MB_ICONINFORMATION, "Login effettuato!", "Hai effettuato l'accesso come: " & @CRLF & $sUsername & ".") ; Mostra la GUI Principale GUISetState(@SW_SHOW, $form_GestioneMagazzino) ; Setta come "non-cliccabile" il bottone di Login GUICtrlSetState($button_Login, $GUI_DISABLE) ; Setta l'utente che ha effettuato l'accesso nella label $label_CaptionUtente GUICtrlSetData($label_CaptionUtente, $sUsername) ; "Distruggi" la GUI Login GUIDelete($form_Login) FileClose($hFileUtenti) EndIf EndIf EndIf EndFunc Func Logout() GUICtrlSetData($label_CaptionUtente, "") MsgBox($MB_ICONINFORMATION, "Logout effettuato!", "Effettua nuovamente il Login per utilizzare il programma.") ; Disabilita tutti i bottoni della GUI Principale GUICtrlSetState($button_VisualizzaGiacenze, $GUI_DISABLE) GUICtrlSetState($button_AggiungiProdotto, $GUI_DISABLE) GUICtrlSetState($button_PrelevaProdotto, $GUI_DISABLE) GUICtrlSetState($button_RicercaProdotto, $GUI_DISABLE) GUICtrlSetState($button_CreaDDT, $GUI_DISABLE) GUICtrlSetState($button_MostraGiacenzeAZero, $GUI_DISABLE) GUICtrlSetState($combo_Magazzino, $GUI_DISABLE) GUICtrlSetState($button_Logout, $GUI_DISABLE) ; Abilita il Login GUICtrlSetState($button_Login, $GUI_ENABLE) EndFunc EDIT:
      Solved, making an "integrated" Login form... 
    • AnonymousX
      By AnonymousX
      Hello, 
      I'm wondering if it is possible to read a radio button off a GUI running by another program? 
      Someone created these Outlook emails that when open appear to be in a GUI format. I could easily come up with a way of navigating these fields by using tab inputs, and then copying specific fields that I need. However there is a spot on the form that has 4 choices of radio buttons, asking for what the status of the task is, and I have no idea how to store which one of these was pressed. 
      End game is to be able to go through thousands of these forms, take input from specific fields from this GUI form in outlook and copy into cells in an excel spreadsheet. I believe I could create a script to do everything I need, if I could just obtain the value from which radio button was pressed.
      Any advice on how to obtain which radio button was press in this outlook form would be appreciated.
      Thanks,
      If I knew VBA better Outlook might have its own functions for figuring this out.
       
      Example:

      In this example I'd want to be able to know that the 2nd or Assigned radio button was selected. Only 1 button is able to be selected at a time. I'm assuming the way to do this would be to tab through the form get to the first box and then run some command to check if pressed then if no, keep checking till I find which of the 4 were pressed.
    • FrancescoDiMuro
      By FrancescoDiMuro
      Good morning guys
      How are you? Hope you're fine
      I'm doing some field checking...
      Can you suggest me something? Something like: If the user doesn't prompt anything in a field, MsgBox and focus on the "blank" field, else, keep up with the script.
      I thought on a nested If...Else, but I have something like 10+ edit to control...
      Thanks guys! 
      EDIT:
      And I would like to know either how to retrieve all listview item ( 2 columns ) from a ListView...
      Column A|Column B
      abcd         | 1234
      bcda         | 1432
      How can I retrieve an array with abcd|1234|bcda|1432 ?
      Thanks  
       
    • triodz
      By triodz
      I want the number in a file to be overwritten with the next number up each time a button is pressed. 
      So it is pressed once, the number '1' is written to the file. It is pressed again and the number '2' overwrites the first number.
      At the moment I get the number 1 written, but can't get it to overwrite. What I have so far:
      #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <FileConstants.au3> #include <MsgBoxConstants.au3> #include <WinAPIFiles.au3> #Region ### START Koda GUI section ### Form=C:\Users\soulf\Desktop\CalcGui\RLCalc.kxf $Form1 = GUICreate("Form1", 615, 437, 426, 141) $One = GUICtrlCreateButton("1", 32, 72, 25, 25) GUICtrlSetBkColor(-1, 0xFF0000) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### Func First ()     $fPath = "C:\temp\First.txt"     $fOpen = FileOpen ($fPath, 2)     $Counter = FileReadLine ($fpath)     $counter = $counter + 1     $fWrite = filewriteline ($fPath, $counter)     FileClose ($fpath) EndFunc While 1     $nMsg = GUIGetMsg()     Switch $nMsg         Case $GUI_EVENT_CLOSE             Exit         Case $One             Call ("First")     EndSwitch WEnd I tried a Do Until statement, but that just puts the numbers 1 to 5 in the file.
      Any help would be greatly appreciated!