September 24, 200817 yr For some specific data entry I have it setup so that barcode scanning happens in a pop-up window. I want that window to close once the barcode is entered and validated. Any suggestion on doing this? Below is my script so far. The last If statement works if someone presses a close button but I don't want them to have to switch from barcode scanner to mouse for each barcode we have to scan. Allow User Abort [ Off ] Set Error Capture [ On ] Set Variable [ $$pwindow_name; Value:Get ( WindowName ) ] Set Variable [ $$window_values; Value:Get ( WindowTop ) & ¶ & Get ( WindowLeft ) & ¶ & Get ( WindowWidth ) & ¶ & Get ( WindowHeight ) ] Set Variable [ $$window_name; Value:"Kit In" ] Set Variable [ $Facility_ID; Value:Facility::Facility_ID ] Go to Object [ Object Name: "IN_KR" ] New Window [ Name: $$window_name ] Go to Layout [ “Kits_Recieved” (Kits_Recieved) ] New Record/Request Set Field [ Kits_Recieved::z_Facility_ID; $Facility_ID ] Set Field [ Kits_Recieved::Date_In; Get ( CurrentDate ) ] Go to Field [ Kits_Recieved::BarCode_In ] Show/Hide Status Area [ Hide ] Adjust Window [ Resize to Fit ] Perform Script [ “Center Window”; Parameter: "window" ] If [ Get ( WindowName ) = "Kit In" ] Pause/Resume Script [ Indefinitely ] Close Window [ Current Window ] End If TIA for any suggestions.
September 25, 200817 yr Most bar code scanners can append a return/enter to each scan, which would resume your script after the Pause.
September 25, 200817 yr Author Thats what I originally thought but it just adds a return to my field. Maybe I have the code in my barcode scanner wrong.
September 25, 200817 yr I find that a Custom Dialog, with the barcode field as the only input field, works well. It will close with either return or enter.
May 14, 200916 yr I know this is very past your posting date, but we just discovered that appending ascii code 6058 to your scan will resume your script. 7013 or 1013, which is what most folks use will only move the cursor to the next line, without resuming your script.
Create an account or sign in to comment