grumbachr Posted September 24, 2008 Posted September 24, 2008 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.
Fitch Posted September 25, 2008 Posted September 25, 2008 Most bar code scanners can append a return/enter to each scan, which would resume your script after the Pause.
grumbachr Posted September 25, 2008 Author Posted September 25, 2008 Thats what I originally thought but it just adds a return to my field. Maybe I have the code in my barcode scanner wrong.
Fenton Posted September 25, 2008 Posted September 25, 2008 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.
datalink Posted May 14, 2009 Posted May 14, 2009 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.
Recommended Posts
This topic is 5670 days old. Please don't post here. Open a new topic instead.
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