caramen Posted July 31, 2018 Share Posted July 31, 2018 (edited) Hi everyone I whould like to start coding a new script to do what i never did yet. Record a value in a text in a field of chrome. This is what i ill get inside the field: [ANAH][88][Demandeur][45896_1529768635] Question concernant mon dossier Bonjour, ********** vous envoie ce message : erreur orientation vers oper 54 a la place oper 31 comminges Coordonnées : - email : ******@orange.fr - tél. : 06******** I want 5 values : $Value0=************ $Value1=88 $Value2=Demandeur $Value3=******@orange.fr $Value4=06******** I dont coded anything yet. Can you guy give me a help on how to start with that ? What i have to look at to do this ? Or even any exemple is welcome Btw the thing that make this script possible to work is the lines of text with these values will never change. Thanks all ! Edited July 31, 2018 by caramen My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted July 31, 2018 Share Posted July 31, 2018 Hi @caramen If this data is collected in a browser page, you could start to take a look at Browsers UDF. You could just take a look at _IE UDF, which is very intuitive and easy to use caramen 1 Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
caramen Posted July 31, 2018 Author Share Posted July 31, 2018 (edited) Hey @FrancescoDiMuro I am sorry i cant see anything about guetting a text data in a field or somthing Edited July 31, 2018 by caramen My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted July 31, 2018 Share Posted July 31, 2018 @caramen Can you provide the webpage you are talking about? Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
caramen Posted July 31, 2018 Author Share Posted July 31, 2018 @FrancescoDiMuro no i am sorry it s à ticket on our ticketing software that is unreachable from internet. but i can screen. My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted July 31, 2018 Share Posted July 31, 2018 @caramen Post the screen Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
caramen Posted July 31, 2018 Author Share Posted July 31, 2018 (edited) @FrancescoDiMuro Edited July 31, 2018 by caramen My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted July 31, 2018 Share Posted July 31, 2018 You should use Au3Info tool to see the tags of those elements, in order to work with them Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
caramen Posted July 31, 2018 Author Share Posted July 31, 2018 (edited) @FrancescoDiMuro ok but when ill got the tag what will make me reg a value in a variable? This is the only point where i need help Edited July 31, 2018 by caramen My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted July 31, 2018 Share Posted July 31, 2018 @caramen Control* functions Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
caramen Posted July 31, 2018 Author Share Posted July 31, 2018 (edited) @FrancescoDiMuro i checked these controls : ControlSetText ControlGetText But my probleme now is when i have a text like this : blablablablablabla 090897 How to get 09897 only in my variable ? Edited July 31, 2018 by caramen My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted July 31, 2018 Share Posted July 31, 2018 Post the text you are trying to "filter" Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
caramen Posted August 1, 2018 Author Share Posted August 1, 2018 @FrancescoDiMuro [ANAH][88][Demandeur][45896_1529768635] Question concernant mon dossier Bonjour, ********** vous envoie ce message : erreur orientation vers oper 54 a la place oper 31 comminges Coordonnées : - email : ******@orange.fr - tél. : 06******** I want the values : -88 -Demandeur -********* (name surname) -******@orange.fr -06******** i want to remove all the text arround these values. My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki Link to comment Share on other sites More sharing options...
caramen Posted August 1, 2018 Author Share Posted August 1, 2018 I mean for exemple for the value 88 : [ANAH][88][Demandeur][45896_1529768635] Question concernant mon dossier Remove all texte before and after each 8 Or for the value ********* (name surname) get everything whrited before « vous envoie ce message » My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted August 1, 2018 Share Posted August 1, 2018 @caramen StringReplace(), StringInStr(), StringRegExp(), StringRegExpReplace() caramen 1 Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
AutoBert Posted August 1, 2018 Share Posted August 1, 2018 (edited) StringRegExp and StringRegExpReplace are very powerful but not needed, if you (same as mine) don't understand to use it. You can use a combination of String* and _StringBetween (using StringRegExp) Small example for _StringBetween: #include <Array.au3> #include <String.au3> Global $sData = FileRead('Dossier.txt') $aSplit = StringSplit($sData, @CRLF, 3) _ArrayDisplay($aSplit) $sEMail = _GetValueInArray($aSplit, '- email : ') ConsoleWrite($sEMail & @CRLF) Global $aData = _StringBetween($aSplit[0], '[', ']') _ArrayDisplay($aData) Func _GetValueInArray($aArray, $sInStr) Local $sRet = '' For $i = 0 To UBound($aArray) - 1 If StringInStr($aArray[$i], $sInStr) Then $sRet = StringReplace($aArray[$i], $sInStr, '') ExitLoop EndIf Next Return $sRet EndFunc ;==>_GetValueInArray As you see $aData[1] is 88 and EMail is stored in a var. dossier.txt Edited August 1, 2018 by AutoBert caramen 1 Link to comment Share on other sites More sharing options...
caramen Posted August 1, 2018 Author Share Posted August 1, 2018 (edited) Ok now i ll start my script i ll come back here for questions thanks guys @AutoBert where ? Edited August 1, 2018 by caramen My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted August 1, 2018 Share Posted August 1, 2018 @caramen In the Help file, or here Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
mikell Posted August 1, 2018 Share Posted August 1, 2018 1 hour ago, AutoBert said: StringRegExp and StringRegExpReplace are very powerful but not needed, if you (same as mine) don't understand to use it. Right, but learning regex is never a waste of time #include <Array.au3> Global $sData = FileRead('Dossier.txt') $pattern = '(?s).+?(\d+)\]\[([^\]]+).+?Bonjour,\s+(.+?) vous envoie.+?email : (\N+).+?tél. : (\N+)' $a = StringRegExp($sData, $pattern, 3) _ArrayDisplay($a) caramen 1 Link to comment Share on other sites More sharing options...
AutoBert Posted August 1, 2018 Share Posted August 1, 2018 4 minutes ago, mikell said: Right, but learning regex is never a waste of time also right with one exception: if learning regex isn't succesfull. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now