26

(4 replies, posted in General)

frm_assistencia.TableGrid_Search_Cl.Visible := true;
frm_assistencia.TableGrid_Search_Cl.left := 16;
frm_assistencia.TableGrid_Search_Cl.Top := 336;

27

(4 replies, posted in General)

tablegrid.top and tablegrid.left?

28

(1 replies, posted in General)

nevermind, first i post the questions, then i try what i think it's obvious.
Ascii number 08 and 127 are both backspace and del.

many thanks anyway big_smile

29

(1 replies, posted in General)

Hello there.
i want to add a "when key pressed"  function to my script. In this case, i want to "clear edit boxes" when i press the "DEL" or "backspace key"

i want to use this function:

Key = # (the number of the key) then etc...

but i can't find a list of the keys that i can use. can you help? do you have a list?
Many thanks

hey guys, i'm scripting the position on a tablegrid to show up where i want , but it doesn't seem to work.
Can anyone check this please?
Cheers

31

(4 replies, posted in Script)

okay, i'll make a "preview" edit box below each edit box and make them visible

32

(10 replies, posted in Script)

Doesn't matter, i will follow your example and make it work, as soon as i have this example ready i shall post it here for other people to use it.

Thanks

DriveSoft wrote:

Unfortunately I don't have actual track code to test it fully, example


procedure click (Sender: TObject; var Cancel: boolean);
var
   s: string;
   track: string;
begin
   track := form1.edit1.Text;
   s := HTTPGet('http://bgpost.bg/IPSWebTracking/IPSWeb_item_events.asp?itemid='+track+'');

   if Pos('<p align="center"><strong>No information, please check your item identifier</strong> </p>', s)> 0 then form1.memo1.Text := 'No information'
   else if Pos('<td align="center" width="18%">Грешен код на пратката </td>', s) then form1.memo1.Text := 'Wrong code';

   //form1.memo1.Text := s;
end;

33

(4 replies, posted in Script)

Hello Dmitry, do you have any idea i can use to make this happen? I could make this one work if i had the possibility to put the text in front of edit boxes, but i can't...

34

(4 replies, posted in Script)

Hello there.
As requested by dmitry here's my project (it's still in it's initial stages) but one thing i would love to have, is a way to preview the text in the edit box i'm typing...

here's my project:

https://ufile.io/pe5yc

Many thanks

35

(10 replies, posted in Script)

if you can show me in this example, maybe i can use it as soon as i find a good "universal tracking" website.

File here:

https://ufile.io/y9jyx

36

(10 replies, posted in Script)

Okay, so HTTPGET will work, but the "data" i receive is the entire "HTTP" Website.
Is there a way to filter what i want?

37

(187 replies, posted in General)

if you can't do that, at least let me be able to put text on top of edit boxes:

https://image.ibb.co/g6fcfd/visual4.png

38

(2 replies, posted in Script)

i might have an idea , i am goign to buy a barcode scanner, and i'll post a concept of what i'm trying to do first...
Thanks

39

(187 replies, posted in General)

of course it supports, maybe i explained it wrong
here's some pictures:

https://image.ibb.co/e19Cfd/visual1.png
https://image.ibb.co/hq850d/visual2.png
https://image.ibb.co/efKCfd/visual3.png

As you can see, i use a script to "preview" what's in the other fields while i am typing, but unfortunately the "hint text" doesn't show up if any character is on that edit box.

if you could implement a way to make the "hint text" allways visible , regardless of what's being typed , it would be great.

40

(187 replies, posted in General)

Hey Dmitry, could you implement a very easy thing and very useful for me?

on the Edit boxes you have "text hint" (the grey text that show's as an anotation on what you can type in).
Can you make it so that it doesn't disapear after we start typing? that way i could use text hint to "preview" all the possible search words (like on google when you start to type something to search and it shows an autocomplete prediction).

Can you do this please? smile
Thanks

41

(12 replies, posted in Script)

ahhh.. yes i understand, i skipped that because i am only using the "edit boxes" in my case. so i have the procedure directly to the entire script.

Many thanks Mathias, once again you are a terrific asset to this group smile

42

(12 replies, posted in Script)

Mathias , i have a question.

Why do you have different procedues for each field, that lead to the same funcion: run a second procedure called apply filters.
Wouldn't it be better if you go directly to call apply filters directly from the procedure?

43

(12 replies, posted in Script)

hey Derek, thanks again for your example, but in your case (and mine too, since i also tried "and's" instead of "or's" and using vars for each edit boxes).
If you have a person called "no phone" without a phone number, you can't search it for his name "no phone" it won't show up, because the other field is blanc.
That's what i need to solve.

44

(12 replies, posted in Script)

the god mathmathou has arrived!

45

(2 replies, posted in SQL queries)

okay here's what i have atm:

frm_assistencia.ComboBox_cl_idcliente.dbItemID := SqlExecute('SELECT IFNULL(id, -1)id FROM cliente WHERE ((nome like "%'+nome+'%") and (contacto2 like "%'+contacto2+'%") and (contacto1 like "%'+contacto1+'%"))');

in this situation, i have several edit boxes that i can type whatever i want in them, and the sql will indeed search for each and every possibility trying to figure out it's nº1 best guess.
But if i have a (null) entry on sql , for instance, if only one contact is avaiable, with this syntax i am not able to get the search to work.

the only other way to do this is to create multiple sql execute commands, one for each edit box. something i'm trying to avoid to keep this database simple and effective

46

(12 replies, posted in Script)

that works well when i'm using 1 search bar, but i want to use 1 for each individual item : name, phone etc... altough using one(like google search) is also very nice.

thanks derek! smile

47

(12 replies, posted in Script)

Hey Derek, sorry to bother you again.

how do i use your expression with multiple filters?

Example:

  frm_assistencia.TableGrid_Search_Cl.dbfilter := ('nome like "%'+nome+'%"') and ('contacto1 like "%'+contacto1+'%"');

48

(12 replies, posted in Script)

thanks Derek! smile

49

(2 replies, posted in SQL queries)

hello, i'm trying to figure out a way to search from mutiple "where's"

here's my syntax, doesn't seem to work:

('SELECT id FROM cliente WHERE contacto1 LIKE "%'+contacto1+'%" and WHERE nome LIKE "%'+nome+'%"')

Contacto1 and nome are vars of course

Many thanks in advance smile

50

(12 replies, posted in Script)

Hey guys.
I know i could just use a search button, hid it, and then use a script to "click" the button.
The problem is that i am trying to clean all the hidden menus all the hidden buttons and get this done manually.

I want to set a tablegrid filter for a search and here's what i'm trying to do:

var s:string
s = (the edit box of the contacts of course)

Form1.tablegrid1.dbFilter := '(clientes.contacts1 (is this the sql table right?) LIKE ''%'+s+'%'''+')
form1.tablegrid1.dbupdate

But i dont understand if this is even possible, or if i am doing anything wrong in my syntax.
Can you guys help?